Quote:
ABCD ABCD BCDE BCDE CDEF CDFE DEFA DEFA
EFAB EFAB FABC FABC ABCD ABCD
Adjust the display function to have all the combination and pickup the distinct strings from it. I just did not test before posting the suggestions.