按照题目意思模拟即可。
Program XJOI2265;
const a:array[..] of char=('a','e','i','o','u','A','E','I','O','U');
var s:ansistring;
len,i,j,sum,x,y:longint;
flag:boolean;
function check(ch:char):boolean;
begin
if (ch>='A') and (ch<='Z') or (ch>='a') and (ch<='z') then exit(true); exit(false);
end;
function vowel(ch:char):boolean;
var i:longint;
begin
for i:= to do if ch=a[i] then exit(true); exit(false);
end;
begin
readln(s);
len:=length(s); sum:=;
for i:= to len do
if check(s[i]) then
begin
write('.');
inc(sum);
end
else write(s[i]);
writeln;
//---------------------- the first --------------------------
x:=round(sum / );
for i:= to len do
if check(s[i]) then
if x> then
begin
write(s[i]);
dec(x);
if x= then y:=i;
end
else write('.')
else write(s[i]);
writeln;
//----------------------- the second -------------------------
flag:=false;
for i:=y+ to len do
if vowel(s[i]) then
begin
flag:=true;
break;
end;
for i:= to y do write(s[i]);
if flag then
for i:=y+ to len do
if check(s[i]) then
if vowel(s[i]) then write(s[i]) else write('.')
else write(s[i])
else
begin
x:=round( sum*/)-round(sum/);
for i:=y+ to len do
if check(s[i]) then
if x> then
begin
write(s[i]);
dec(x);
end
else write('.')
else write(s[i]);
end;
writeln;
//----------------------- the end ------------------------- end.