while True: try: a = list(input()) # 將輸入的文字轉換成串列 b = a[::-1] # 反轉串列 output = ''.join(b) # 組合串列內容 print(int(output)) # 轉換成數字輸出 ( 消除 0 ) except: break