r=raw_input() i=0 for c in r: if i==r.find(c):print c+":",r.rfind(c)-i i+=1

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

download

return top