#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#define f(i,j,n) for(i=j;i<=n;i++) //for循环简写,福利福利~
int main()
{
int n, i = 0, j, k, sum = 0, arr[40000], cnt = 0;
scanf("%d", &n);
while( sum != n*n){
scanf("%d", &arr[i]);
sum += arr[i];
i++;
}
for ( j = 0; j < i; j += 2){ //j为0,2,4...方便后续输出
for ( k = 0; k < arr[j]; k++){
printf("0");
cnt++;
if (cnt%n == 0)
printf("\n");
}
for ( k = 0; k < arr[j + 1]; k++){
printf("1");
cnt++;
if (cnt%n == 0)
printf("\n");
}
}
return 0;
}