while True:
    try:
        s = list(input())
        #列表倒序
        s.reverse()
        print(''.join(s))
    except:
        break