#include<iostream>
using namespace std;
int main(){
int n,i,j,k;
cin>>n;
for (i=1;i<=n;i++){
for (j=1;j<=n-i;j++){
cout<<" ";
}
for (k=1;k<=i;k++){
cout<<k;
}
for (k=i-1;k>=1;k--){
cout<<k;
}
cout<<endl;
}
}
//programul afisaza
1
121
12321
1234321
123454321