from itertools import product from new_suffix_array import ukkonen MAX_LEN = 5 NUM_LETTERS = 6 alphabet = "".join(map(chr, range(ord("a"), ord("a") + NUM_LETTERS))) combos = map(lambda x: "".join(x)+"$", product(alphabet, repeat=MAX_LEN)) for i in range(100): try: ukkonen(next(combos)) except StopIteration: print("**** TEST ENDED ****")