#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(){
int num,temp=0;
int arr[100];
int N ,W;
cin>>N>>W;
int array[N][N];
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if(num== W){
num=0;
cin>>W;
if(temp==1){
temp=0;
}else{
temp =1;
}
}
array[i][j]=temp;
num++;
}
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cout <<array[i][j];
}
cout << endl;
}
}