S = input() for i in range(len(S)): if S[i:].isdecimal(): T = S[:i] S = S[i:] print(T[::-1] + S)