var s:string;i,p:word=1;begin repeat readln(s);p:=pos(("mariko ")[i],s);if p>0then s[p]:=upcase(s[p]);i:=i+ord(p>0);writeln(s)until 1=0end.