#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b=1,c,d,e;
cin>>a;
e=a;
while(c!=a)
{
while(d!=e)
{
if(b<10)
{
cout<<0<<b;
}
else
{
cout<<b;
}
d++;
b++;
}
e--;
c++;
d=0;
cout<<endl;
}
if(b<10)
{
cout<<0<<b;
}
else
{
cout<<b;
}
return 0;
}