program makenames;

var
 i,j,a,b: integer;
 name: string[13];
 last: char;

begin
 RANDOMIZE;
 for j:=1 to 5000 do
  begin
   a:=1;
   b:=random(11) + 3;
   if random(2)=0 then last:='A' else last:='B';
   name[0]:=chr(b);
   repeat
    case last of
     'A','E','I','O','U','Y': last:=chr(random(26)+65);
     'Q': last:='U';
     else
      begin
       last:=' ';
       while last=' ' do
        begin
         last:=chr(random(26)+65);
         case last of
          'A','E','I','O','U','Y':;
           else last:=' ';
         end;
        end;
      end;
    end;
    name[a]:=last;
    inc(a);
   until a=b;
   writeln(name);
  end;
end.