program coinn;
var
i,j,n,x,y,ii,xx:integer;
a:array[1..100] of integer;
begin
assign(input,'coinn.in');
reset(input);
assign(output,'coninn.out');
rewrite(output);
read(n);
write(n);
writeln;
for i:=1 to n do a[n]:=0;
for i:=1 to n do
begin
for j:=1 to n do a[j]:=(a[j]+1) mod 2;
a[i]:=(a[i]+1) mod 2;
for j:=1 to n do write(a[j]);
writeln;
end;
close(input);
close(output);
end.