可以用reversed(seq)函数
while True:
    try:
        n = list(reversed(input()))
        print(''.join(n))
    except:
        break