data = input().split(' ')
result = []
for word in data:
    reversed_word = f"{''.join(list(reversed(word)))}"
    if word == reversed_word and word not in result:
        result.append(word)
result = sorted(result, key=str.lower)
print(', '.join(result))

7d7fe6920e503f8f1080300d4dc815482462a185
<mask token>

<mask token>
for word in data:
    reversed_word = f"{''.join(list(reversed(word)))}"
    if word == reversed_word and word not in result:
        result.append(word)
<mask token>
print(', '.join(result))

data = input().split(' ')
result = []
for word in data:
    reversed_word = f"{''.join(list(reversed(word)))}"
    if word == reversed_word and word not in result:
        result.append(word)
result = sorted(result, key=str.lower)
print(', '.join(result))
