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