#include<bits/stdc++.h>
using namespace std;
int a[1000][1000];
int n,t=1;
void dfs(int x1,int y1,int x2,int y2){
if(x1==x2&&y1==y2)return;
for(int i=x1;i<=x2/2;i++){
for(int j=y1;j<=y2/2;j++){
a[i][j]=0;
}
}
dfs(x1,y1+y2/2,x2/2,y2);
dfs(x1+x2/2,y1+y2/2,x2,y2);
dfs(x1+x2/2,y1,x2,y2/2);
}
int main(){
cin>>n;
for(int i=0;i<n;i++){
t*=2;
}
for(int i=1;i<=t;i++){
for(int j=1;j<=t;j++){
a[i][j]=1;
}
}
dfs(1,1,t,t);
for(int i=1;i<=t;i++){
for(int j=1;j<=t;j++){
cout<<a[i][j]<<" ";
}
cout<<endl;
}
}