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:=24198234;
  writeln(100000);
  for i:=1 to 100000 do 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;
end.