#include <bits/stdc++.h>
using namespace std;
int main(){
int n,a[10][10];
cin>>n;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(i+j==n-1){
cout<<swet(3)<<1;
}else{
cout<<swet(3)<<0;
}
}
cout<<endl;
}
}
/**************************************************************
Problem: 1191
User: wangyiyang
Language: C++
Result: Compile Error
****************************************************************/