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