var
s:string;
function schimba(s:string):string;
var
i:integer;
x:string;
begin
i:=1;
while (i<length(s)) do
if (s[i]+s[i+1]<>'ma') then
begin
x:=x+s[i];
i:=i+1;
end
else
begin
x:=x+'ti';
i:=i+2;
end;
if (s[length(s)-1]+s[length(s)]<>'ma') then x:=x+s[length(s)];
schimba:=x;
end;
begin
read(s);
s:=schimba(s);
writeln(s);
end.