const
 K = 1000;
 N = 300;

var
 i,j: Integer;
 w: array[1..K] of String[20];
 s,buf: String;
 k1,l: Integer;
 c:char;
 f: boolean;

procedure quicksort;

procedure sort(l,r: integer);
var
  i,j: integer;
  x,y: String[20];
begin
  i:=l; j:=r; x:=w[(l+r) DIV 2];
  repeat
    while w[i]<x do i:=i+1;
    while x<w[j] do j:=j-1;
    if i<=j then
    begin
      y:=w[i]; w[i]:=w[j]; w[j]:=y;
      i:=i+1; j:=j-1;
    end;
  until i>j;
  if l<j then sort(l,j);
  if i<r then sort(i,r);
end;

begin {quicksort};
  sort(1,K);
end;

procedure DoError(var s: String);
begin
     k1:=Random(4)+1;
     if k1=1 then begin
       l:=Random(length(s))+1;
       c:=chr(Random(26)+ord('a'));
       s[l]:=c;
     end;
     if (k1=2) and (length(s)<20) then begin
       l:=Random(length(s))+1;
       insert(s[l],s,l+1);
     end;
     if (k1=3) and (length(s)>1) then begin
       l:=Random(length(s))+1;
       delete(s,l,1);
     end;
     if (k1=4) and (length(s)>2) then begin
      l:=Random(length(s)-1)+1;
      c:=s[l]; s[l]:=s[l+1]; s[l+1]:=c;
     end;
end;

begin
 randomize;
 w[1] := 'abbcdefhgidbacc';
 for i:=2 to K do
 begin
  repeat
   s:=w[Random(i-1)+1];
   for j:=1 to 3 do
   begin
     DoError(s);
   end;

   f:=true;
   for j:=1 to i-1 do
     if w[j]=s then begin f:=false; break; end;

  until f;

  w[i]:=s;
 end;

 QuickSort;

 writeln(K);
 for i:=1 to k do writeln(w[i]);

 writeln(N);
 for i:=1 to N do begin
  buf := '';
  repeat
    j := Random(k)+1;
    s := w[j];
    k1 := Random(2);
    for j:=1 to k1 do DoError(s);
    if buf='' then buf:=s else
      if length(buf)+length(s)+1<=80 then buf:=buf+' '+s else break;
  until false;
  writeln(buf);
 end;

end.