#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define i27 __int128
using namespace std;
const ll NMAX=1e6+5;
const ll NMAX2=1+5;
const double eps=1e-8;
const ll TIME_MAX=9e8+5;
const ll MOD=1999999973;
const ll PLUS=1e5;
const ll K=300;
ll get_time(){
return chrono::steady_clock::now().time_since_epoch().count();
}
/*vector<int> v;
bitset<NMAX> c;
void ciur(){
c[0]=c[1]=1;
for(ll i=2;i<NMAX;i++){
if(c[i]==0){
v.push_back(i);
for(ll j=i*i;j<NMAX;j+=i){
c[j]=1;
}
}
}
}*/
ll binPow(ll a,ll p){
ll ans=1;
while(p){
if(p&1){
ans*=a;
ans%=MOD;
}
a*=a;
a%=MOD;
p/=2;
}
return ans;
}
bool good(ll n, ll p){
while(n){
p-=n/5;
n/=5;
}
return (p<=0);
}
void probleme(){
//ciur();
ll n;
cin>>n;
for(ll cnt=1;cnt<=n;cnt++){
for(ll i=cnt;i<=n;i++){
for(ll j=cnt;j<=i;j++){
cout<<j<<' ';
}
cout<<'\n';
}
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
#ifdef LOCAL
freopen("thing2.in","r",stdin);
freopen("thing2.out","w",stdout);
#else
freopen("submultimi.in","r",stdin);
freopen("submultimi.out","w",stdout);
#endif
ll start=get_time();
//ll t; cin>>t; while(t--)
probleme();
ll x=get_time()-start;
cerr<<"------>secunde - "<<x/1000000000<<'\n';
cerr<<"-->milisecunde - "<<x/1000000%1000<<'\n';
cerr<<"->microsecunde - "<<x/1000%1000<<'\n';
cerr<<"-->nanosecunde - "<<x%1000;
return 0;
}