s=raw_input();x=[""]*3 for i in s:x[cmp(i,s[0])]+=i print x[2]+x[0]+x[1]