import sys

data=sys.stdin.readline()
data=list(data)
data.sort()
data.remove('\n')
result=""
d={}
for item in data:
    if item not in d.keys():
        d[item]=1
    else:
        d[item]=d[item]+1

for item in d.keys():
    result=result+item+str(d[item])

print(result)