S = input() idx = 0 for i in range(len(S)): if S[i].isdigit(): idx = i break print(S[:idx][::-1]+S[idx:])