# import itertools

# counter = itertools.count()

# data = [100, 200, 300, 400]

# daily_data = list(zip(itertools.count(1), data))

# print(daily_data)

# Trizha Itertool
# num = [0, 1, 2, 3, 4, 5]

# lock = itertools.permutations(num, 4)

# for item in (lock):
#     result = ''.join(map(str, item))
#     if result[2] == '3':
#         print(result)

# import itertools
# import string
# import enchant

# checker = enchant.Dict("en_US")
# letters = list(string.ascii_lowercase)
# prod = itertools.product(letters, repeat=4)
# for i in prod:
#     word = "".join(i)
#     if(checker.check(word) and word == word[::-1]):
#         print(word)

# import itertools
# import string

# with open('english_word.txt') as txt_file:
#     # checker = enchant.Dict("en_US")
#     reader = txt_file.readlines()
#     words = [str(i).split('\n')[0] for i in reader if len(i) == 5]
#     letters = list(string.ascii_lowercase)
#     prod = itertools.product(letters, repeat=4)
#     for i in prod:
#         word = "".join(i)
#         if(word in words and word == word[::-1]):
#             print(word)

import itertools
import string
import enchant
lowercase = string.ascii_lowercase
check_word = enchant.Dict("en_US")
for i in itertools.product(lowercase, lowercase, repeat=2):
    combinations = ''.join(map(str, i))
    rev = ''.join(reversed(combinations))
    if combinations == rev:
        if check_word.check(combinations):
            print(combinations)