f=lambda x:e.count(x)+e.count(x+'2')*2 while 1:e=input().split();print(*[c+str(f(c))*(f(c)>1)for c in'm kg s A K mol cd'.split()if f(c)])

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page