#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ofstream fout("bac.txt");
int n,i,v[100];
cout<<"n="; cin>>n;
for(i=0;i<n;i++)
{
v[i]=2*i;
}
while(n>0){
for(i=0;i<n;i++)
fout<<v[i]<<" ";
fout<<endl;
n=n-1;
}
fout.close();
return 0;
}