#include<iostream>
using namespace std;
int main()
{
int n, s = 0, t, l = 1;
cin >> n;
while (s <= n * n)
{
cin >> t;
if (l % 2 == 1)
{
for (int j = 0; j < t; j++)
{
cout << 0;
s++;
if (s % n == 0)cout << endl;
}
}
if (l % 2 == 0)
{
for (int j = 0; j < t; j++)
{
cout << 1;
s++;
if (s % n == 0)cout << endl;
}
}
l++;
}
return 0;
}