# 读取四位整数 n = input().strip() # 反转字符串并输出 reversed_n = n[::-1] # 确保输出是四位数字(虽然输入是四位,反转后也一定是四位) print(reversed_n)