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