number = int(raw_input())
reverse = 0
while(number > 0):
 remainder = number % 10
 reverse = reverse * 10 + remainder
 number = number//10
print reverse

525511b810dcf81f1384984136395a892aa93f12
number = int(raw_input())
reverse = 0
while(number > 0):
 remainder = number % 10
 reverse = reverse * 10 + remainder
 number = number//10
print reverse
