from collections import Counter c = Counter(list(raw_input())) d = sorted(c.items(), reverse=True) s = '' for k,v in d: s += k*v print s