#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
int a[205][205];
int b[10000];
bool visit[10000];
int main()
{
int n,count = 0,cnt = 0,flag = 0,p = 0;
cin >> n;
for(int i = 0;;i++)
{
if(cin.get() == '\n') break;
cin >> b[i];
}
for(int j = 1;j <= n;j++)
for(int m = 1;m <= n;m++)
{
while(b[p] == 0&&visit[p] == 0)
{
if(cnt == 0) cnt = 1;
else cnt = 0;
visit[p] = 1;
p++;
}
a[j][m] = cnt;
count++;
if(count == b[p]&&visit[p] == 0)
{
count = 0;
if(cnt == 0) cnt = 1;
else cnt = 0;
visit[p] = 1;
p++;
}
}
for(int k = 1;k <= n;k++)
{
for(int l = 1;l <= n;l++)
cout << a[k][l];
cout << endl;
}
return 0;
}