program xxxx;
var n,i:integer;s,s1:string;
begin
assign(input,'latin.in');
reset(input);
assign(output,'latin.out');
rewrite(output);
readln(n);
for i:=1 to n do
begin
readln(s);
if (s[1]='a')or(s[1]='e')or(s[1]='i')or(s[1]='o')or(s[1]='u') then
s:=s+'cow'
else
begin
s1:=copy(s,1,1);
delete(s,1,1);
s:=s+s1+'ow';
end;
writeln(s);
end;
close(input);
close(output);
end.