while True: i = input() if i == 'END': break i = i[::-1] print(i)