public class Solution
{
public static void main(String[] args)
{
System.out.println("Graph 1");
for(int i = 1; i <= 6; i++)
{
for(int j = 1; j <= i; j++)
System.out.print(j + " ");
System.out.println();
}
System.out.println();
System.out.println("Graph 2");
for(int i = 1; i <= 6; i++)
{
for(int j = 1; j <= 6 - i + 1; j++)
System.out.print(j + " ");
System.out.println();
}
System.out.println();
System.out.println("Graph 3");
for(int i = 1; i <= 6; i++)
{
for(int j = 1; j <= 6 - i; j++)
System.out.print(" ");
for(int j = i; j >= 1; j--)
System.out.print(j + " ");
System.out.println();
}
System.out.println();
System.out.println("Graph 4");
for(int i = 1; i <= 6; i++)
{
for(int j = 1; j <= i - 1; j++)
System.out.print(" ");
for(int j = 1; j <= 6 - i + 1; j++)
System.out.print(j + " ");
System.out.println();
}
}
}