s=raw_input() v=sorted(set(s)) for a in v:print''.join(' #'[(b,a)in zip(*[iter(s)]*2)]for b in v).rstrip()
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page