#include<iostream>
using namespace std;
int main()
{
int n,c=0,a,b=0,d,e,f=0;
cin >> n;
for (int i = 1; b<=n*n ; i++)
{
cin >> a;
c++;
d = c % 2;
for (int j = 1; j <= a; j++)
{
f++;
e = f % n;
if (d == 1) cout << 0;
else cout << 1;
if (e == 0) cout << endl;
}
b = a + b;
}
return 0;
}