#include <algorithm>
#include<bits/stdc++.h>
#include <cmath>
#include <csetjmp>
#include <cstring>
using namespace std;
const int maxn = 1025;
int vis[maxn][maxn];
void flag(int x1,int y1 , int x2 , int y2 ){
if( x2 == x1 ==1 && y2 == y1){
return;
}
for(int i = x1 ;i < (x1+x2)/2 ; i++){
for(int j = y1 ;j < (y1+y2)/2 ; j++){
vis[i][j] = 1;
}
}
flag((x1+x2)/2, (y1+y2)/2,x2,y2);
flag(x1,(y1+y2)/2,(x1+x2)/2,y2);
flag((x1+x2)/2,y1, x2,(y1+y2)/2);
}
int main()
{
int n;
cin >> n;
int size = pow(2,n);
memset(vis,0,sizeof(vis));
flag(0,0,size,size);
for(int i = 0 ; i< size ; i++){
for(int j = 0 ; j < size ; j++){
if(vis[i][j] == 0){
cout << 1;
}else{
cout << 0;
}
if(j!=size-1) cout <<" ";
else{
cout <<"\n";
}
}
}
return 0;
}