const
   n=10000;

   function randword:string;
   var
      s:string;
      i:integer;
   begin
      s:='';
      for i:=1 to random(20)+1 do
         s:=s+chr(random(26)+ord('A'));
      randword:=s;
   end;

var
   i:integer;
begin
   randomize;
   writeln(chr(random(8)+ord('2')),chr(random(8)+ord('2')),chr(random(8)+ord('2')));
   writeln(n);
   for i:=1 to n do
      writeln(randword);
end.