import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
short n = in.nextShort();
int len = (int) Math.pow(2,n);
char[][] matrix = new char[len][len];
for (short i = 0; i < len; i++) {
for (short j = 0; j < len; j++) {
matrix[i][j] = '1';
}
}
m1(matrix,len, (short) 0, (short) 0);
for (short i = 0; i < len; i++) {
for (short j = 0; j < len; j++) {
System.out.print(matrix[i][j] + " ");
}
System.out.println();
}
}
public static void m1(char[][] matrix,int len,short x,short y) {
len /= 2;
for (short i = x,i1 = 0; i1 < len; i++,i1++) {
for (short j = y,j1 = 0; j1 < len; j++,j1++) {
matrix[i][j] = '0';
}
}
if(len != 0){
m1(matrix,len,x, (short) (y+len));
m1(matrix,len, (short) (x+len),y);
m1(matrix,len, (short) (x+len), (short) (y+len));
}
}
}