#include <iostream> using namespace std; int main() { int n,A[11][11]; cin>>n; for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) if(i==j) A[i][j]=n; else if(i<j) A[i][j]=A[i][j-1]-1; else A[i][j]=A[i-1][j]-1; for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) cout<<A[i][j]<<" "; cout<<endl; } return 0; }