import java.util.Scanner;
public class yildiz {
public yildiz() {
}
public static void main (String [] args){
Scanner klavye=new Scanner(System.in);
System.out.print("Sayı =");
int y=klavye.nextInt(),x,z,t,i=1;
/** for(x=1;x<=y;x++){
for(z=1;z<=x;z++){
System.out.print("*");}
System.out.println(" ");}
for(x=1;x<=y;x++){
for(t=(y-x);t>0;t--){
System.out.print("*");}
System.out.println(" ");}
*/
for(x=1;x<=y;x++){
for(t=(y-x);t>0;t--){
System.out.print(" ");}
for(z=1;z<=(2*x-1);z++){
if (z<=x)
i=(int)Math.pow(2,(z-1));
else
i/=2;
System.out.print(i+" ");}
System.out.println(" ");}
for(x=2;x<=y;x++){
for(t=1;t<x;t++){
System.out.print(" ");}
for(z=1;z<=(2*(y-x)+1);z++){
if (z<=(y-x+1))
i=((int)Math.pow(2,(z-1)));
else
i/=2;
System.out.print(i+" ");}
System.out.println(" ");}
}}