l = input() t = l.find(max(l)) l = list(l) l[0],l[t] = l[t],l[0] print(''.join(l))