s = input() i = 0 while i < len(s) and s[i].isalpha(): i += 1 print(s[:i][::-1] + s[i:])