const
   con:array[0..9] of word = (6,7,9,10,12,13,15,16,18,19);
type
  mas = array[1..20]of word;
var
   n:byte;


procedure generate(k:byte);
var
   a:mas;
   f:text;
   i:byte;
   s:string;
   j:byte;

begin
  s:='signals.'+chr(n+48);
  assign(f,'s');
  rewrite(f);
  writeln(f,k div 2);
  fillchar(a,sizeof(a),0);
  i:=1;
  while i<=k-1 do
  begin
    a[i]:=1;
    a[i+1]:=1;
      for j:=1 to k do
       write(f,a[j]);
       writeln(f);
    inc(i,2);
  end;
  close(f);
end;

begin
   n:=1;
   for n:=0 to 9 do
   generate(con[n]);
{   generate(7);
   generate(9);
   generate(10);
   generate(12);
   generate(13);
   generate(15);
   generate(16);
   generate(18);
   generate(19);  }
end.
