import java.util.Scanner;

 

public class BintangAngka

{

public static void main(String[] args)

{

int i,j;

Scanner Input = new Scanner(System.in);

System.out.print(“Masukan Nilai : “);

int n = Input.nextInt();

for(i=1;i<=(n+1);i++)

{

for(j=1;j<=i;j++)

{

if(j==1)

System.out.print(i-1);

else

if(j==n+1)

System.out.print(n*2);

else

if(j==i)

System.out.print((i+j)-2);

else

if(i==n+1)

System.out.print((i+j)-2);

else

if(j==(n-1))

System.out.print(i);

else

System.out.print(” “);

}

System.out.print(“\n”);

}

}

}