var i:byte;s:string;begin repeat readln(s);for i:=3to length(s)do if(s[i-2..i]=" # ")|(s[i-1..i]=". ")then s[i]:=".";writeln(s)until 0>0end.