#include <iostream>
#include <string>
#include<math.h>
#include<algorithm>
#include<cstring>
using namespace std;
int main() {
int n;
int b[50000];
memset(b, -1, sizeof(b));
bool c = 0;
int sum = 0;
int i = 0, j = 0;
cin >> n;
while (sum < n * n) {
cin >> b[i];
sum += b[i++];
}
for (int i = 0; i < n * n; i++) {
cout << c;
b[j]--;
if (b[j] == 0) {
j++;
c = !c;
}
if (i % n == n - 1) {
cout << endl;
}
}
return 0;
}