procedure mychar(q:integer);
var i:integer;
begin
  for i:=1 to 3 do begin
    write(char(q mod 26+ord('A')));
    q:=q div 26;
  end;
end;
var i,j,t:integer;
begin
  randseed:=23478234;
  writeln(100000);
  for i:=1 to 26*26*26 do begin
    mychar(i-1);
    for j:=1 to 3*8 do
      write(chr(random(26)+ord('A')));
    mychar(i-1);
    writeln;     
  end;
  for i:=26*26*26+1 to 100000 do begin
    t:=random(26*26*26);
    mychar(t);
    for j:=1 to 3*8 do
      write(chr(random(26)+ord('A')));
    t:=random(26*26*26);
    mychar(t);     
    writeln;     
  end;
end.