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,x:integer;
begin
  randseed:=21234;
  writeln(100000);
  for i:=1 to 100000 do begin
    if (random<0.9) then begin
      x:=random(26*26*26-1);
      mychar(x);
      t:=random(9);
      for j:=1 to 3*t do
        write(chr(random(26)+ord('A')));
      mychar(x+random(26*26*26)-x);
      writeln;     
    end else begin
      mychar(random(26*26*26-1));
      writeln;
    end;
  end;
end.