c=input()+"||" l=sorted(zip(c[1::2],c[::2])) w="a" z=[" "]*30 for y,x in l: if y!=w:print("".join(z).rstrip());z=[" "]*30;w=y z[ord(x)-97]="#"
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page