while True:
    try:
        print(input()[::-1])
    except:
        break

[::-1]来表示倒叙