s = eval(input())

if len(s) == 2:

    print(s)

else:

    t = ''

    for i in range(1, len(s) + 1):

        t += s[(-1) * i]

    print(t)

s = eval(input())

print((s if len(s) == 2 else s[::-1]))
s = eval(input())
if len(s) == 2:
    print(s)
else:
    t = ""
    for i in range(1, len(s) + 1):
        t += s[(-1) * i]
    print(t)

s = eval(input())
print((s if len(s) == 2 else s[::-1]))

-if len(s) == 2: -    print(s) -else: -    t = "" -    for i in range(1, len(s) + 1): -        t += s[(-1) * i] -    print(t) +print((s if len(s) == 2 else s[::-1]))