S=eval(input())



if len(S)==2:

    print(S)

else:

    print((''.join(list(reversed(S)))))

s = eval(input())



if len(s)==2:

	print(s)

else:

	s = list(s)

	s.reverse()

	print(("".join(s)))
S = eval(input())
if len(S) == 2:
    print(S)
else:
    print(("".join(list(reversed(S)))))

s = eval(input())
if len(s) == 2:
    print(s)
else:
    s = list(s)
    s.reverse()
    print(("".join(s)))

-S = eval(input()) -if len(S) == 2: -    print(S) +s = eval(input()) +if len(s) == 2: +    print(s) -    print(("".join(list(reversed(S))))) +    s = list(s) +    s.reverse() +    print(("".join(s)))