while 1:r=raw_input()+" ";print" ".join("[4%dm"%"xrg+b+cw+ ".find(c)*(p!=c)for p,c in zip(" "+r,r))