program ex;
const
c='cow';
var
b:array[1..5] of char;
a:array[1..100] of string;
s,s1:string;
l,i,j,k,m,n,x:integer;
pd:boolean;
f:text;
begin
assign(f,'latin.in');
reset(f);
b[1]:='a';
b[2]:='i';
b[3]:='o';
b[4]:='e';
b[5]:='u';
readln(f,n);
for i:=1 to n do
begin
readln(f,s);
pd:=false;
for j:=1 to 5 do
if (s[1]=b[j]) then
pd:=true;;
if pd then
begin
s:=s+c;
a[i]:=s;
end
else
begin
s1:=copy(s,1,1);
delete(s,1,1);
s:=s+s1+'ow';
a[i]:=s;
end;
end;
close(f);
assign(f,'latin.out');
rewrite(f);
for i:=1 to n do
writeln(f,a[i]);
close(f);
end.