#include<stdio.h>
#include<math.h>
#define MAX 500
void realease(int square[MAX][MAX], int x, int y, int t);
int main()
{
int n;
int square[MAX][MAX];
scanf_s("%d", &n);
int t = pow(2, n);
for (int i = 0; i < t; i++)
for (int j = 0; j < t; j++)
square[i][j] = 1;
realease(square, 0, 0, t);
for (int i = 0; i < t; i++)
{
for (int j = 0; j < t; j++)
printf("%d", square[i][j]);
printf("\n");
}
}
void realease(int square[MAX][MAX], int x, int y, int t)
{
if (t == 1)
return;
t /= 2;
for (int i = x; i < x + t; i++)
{
for (int j = y; j < y + t; j++)
square[i][j] = 0;
}
realease(square, x + t, y, t);
realease(square, x, y + t, t);
realease(square, x + t, y + t, t);
}