while True: try: str = input() assert(len(str)<=1000) assert(str.islower()) print(str[::-1]) except: break