let str = readline()
print(str.split('').reverse().join(''))

先转数组,利用reverse反转,再转字符串