s="" t="" for c in input(): if c.isdigit(): t+=c else: s+=c print(s[::-1]+t)