#include #include using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000000 int main(){ int V,D; cin>>V>>D; vector ans(V,string(V,'0')); if(D>=2){ rep(i,V){ ans[i][0] = '1'; ans[0][i] = '1'; } } else if(D==1){ rep(i,V){ rep(j,V){ ans[i][j] = '1'; } } } rep(i,V){ cout<