from combs import * 
'''
creates two CSV files that each contain a word such that, as a tuple, they contain every word in alphabet1 x alphabet2 of leght N.
'''
def main(args):
    alphabet1 = [-2,2]
    alphabet2 = [3,4]
    
    if (len(args) >= 2):
        N = int(args[1])
    else:
        N = 7
    
    alphabet = list(itertools.product(alphabet1, alphabet2))
    word = pse_period(alphabet, N)
    words = tuple(zip(*word))
    with open(f'./output/bidiagonal1_{N}.txt', 'w') as fp:
        fp.write(', '.join(map(str, words[0])))
    with open(f'./output/bidiagonal2_{N}.txt', 'w') as fp:
        fp.write(', '.join(map(str, words[1])))
        
        
if __name__ == "__main__":
    main(sys.argv)
