#5.6.2 def f(n): if len(n) == 1: return n else: return f(n[1:])+n[0] word = input("") print(f(word))