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