j=''.join while 1: l=9*['/'] for i in input():l[j(l).count(i)]+=i print(j(l).strip('/'))