a=(input())
A=[]
for i in a:
A.append(i)
B=list(set(A))
B.sort()
#print(A)
#print("B字串去重複:",B)
T=[]
for i in B:
t=0
for j in A:
if i==j:
t+=1
T.append(str(t))
#print("每個字次數T:",T)
for i in range(len(T)):
T[i]=int(T[i])*100-T.index(T[i])
#print(T)
T1=sorted(T,reverse=True,)
#print(T1)
for i in range(len(B)):
print(B[T.index(T1[i])],end=" ")