直接用reversed函数获得翻转序列并遍历打印

for word in reversed(input()):
    print(word, end='')