{Albert Pan Grade 7
Woburn CI
Junior }
uses crt;
var b:boolean;
i,j,len,len2:shortint;
temp,word2:string;
word:array[1..30] of string;
begin
for i:=1 to 5 do
begin
word2:='';
for j:=1 to 30 do
word[j]:='';
b:=false;
clrscr;
readln(temp);
len:=length(temp);
for j:=1 to len do
word[j]:=temp[j];
for j:=1 to len do
begin
if word[j]='A' then
begin
if word[j+1]='N' then
begin
word2:=word2+'UN';
word[j+1]:='';
end
else if word[j+1]='U' then
begin
word2:=word2+'OO';
word[j+1]:='';
end
else
begin
if j<>len then
word2:=word2+'E'
else
word2:=word2+'A';
end;
end
else if word[j]='O' then
begin
if word[j+1]='W' then
begin
word2:=word2+'OO';
word[j+1]:='';
end
else
word2:=word2+'U';
end
else if word[j]='I' then
begin
if (b=true) or (j=1) then
word2:=word2+'I'
else
word2:=word2+'EE';
b:=true;
end
else if word[j]='U' then
word2:=word2+'OO'
else
word2:=word2+word[j];
word[j]:='';
len2:=length(word2);
end;
if (temp[len]='N') and (temp[len-1]='E') then
word2[length(word2)]:='E';
if temp[len]='E' then
word2:=word2+'-A';
if temp[1]='E' then
word2[1]:='I';
writeln(word2);
readln;
end;
end.