var s:string;i:word;begin repeat readln(s);for i:=1to length(s)do write("\x1b[4"+chr(57-pos(s[i],"-wc-b-grx"))+^-:ord(s[i]<>(^`+s)[i])*5," ");writeln("\x1b[49m")until 0>0end.
Note that non-ascii characters in the above source code will be escaped (such as \x9f).