S = input() x = [] y = [] for c in S: if "a" <= c <= "z": x.append(c) else: y.append(c) x.reverse() x += y print (*x,sep="")