S = input() N = len(S) A = None B = None for i in range(N): if S[i].isdecimal(): A = S[:i] B = S[i:] break print(A[::-1] + B)