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]="#"