uses crt;
type kkk=array[1..1000] of string[20];
var br,n:integer;
    st:kkk;
    f:text;
function step(n:integer):integer;
var x,i:integer;
begin
x:=1;
for i:=1 to n do x:=x*2;
step:=x;
end;

procedure dec(var st:kkk;var br:integer);
var p,i:integer;
begin
br:=0;
for i:=1 to step(n) do begin
                       br:=br+1;
                       p:=i-1;
while p>0 do
             if p mod 2 = 0 then begin
                               st[br]:=st[br]+'0';
                               p:=p div 2;
                               end

                          else begin
                               st[br]:=st[br]+'1';
                               p:=p div 2;
                               end;
                          end;

for i:=1 to br do if length (st[i])<n then for p:=length(st[i])+1 to n do st[i]:=st[i]+'0';
for i:=1 to br do begin  writeln(st[i]);end;
end;

function miss(st:kkk;br:integer;x:integer):string;
var i:integer;r:string;
begin
r:='';
for i:=1 to length(st[br]) do if i<>x then r:=r+st[br][i];
miss:=r;
end;

begin
assign(f,'signals.0');
readln(n);
writeln(step(n));
dec(st,br);
readln;
end.