def reverse_number(number):
    reversed_number = int(str(number)[::-1])
    return reversed_number

while True:
    input_number = int(input())
    mirrored_number = reverse_number(input_number)
    print(mirrored_number)
