#include<bits/stdc++.h>
using namespace std;
int n;
bool jz[1025][1025];
void f(int sti,int stj,int bc);
int main(){
scanf("%d",&n);
f(1,1,n);
int bc=2<<n;
for(int i=1;i<=bc;i++){
for(int j=1;j<=bc;j++){
printf("%d ",!jz[i][j]);
}
printf("\n");
}
return 0;
}
void f(int sti,int stj,int bc){
int l=pow(2,bc-1);
for(int i=sti;i<sti+l;i++){
for(int j=stj;j<stj+l;j++){
jz[i][j]=1;
}
}
f(sti+l,stj+l,bc-1);
f(sti+l,stj,bc-1);
f(sti,stj+l,bc-1);
return;
}