Problem: Gerald has n younger brothers and their number happens to be even. One day he bought n2 candy bags. One bag has one candy, one bag has two candies, one bag has three candies and so on. In fact, for each integer k from 1 to n2 he has exactly one bag with k candies. 

Help him give n bags of candies to each brother so that all brothers got the same number of candies.

Input

The single line contains a single integer n (n is even, 2 ≤ n ≤ 100) — the number of Gerald's brothers.

Output

Let's assume that Gerald indexes his brothers with numbers from 1 to n. You need to print n lines, on the i-th line print n integers — the numbers of candies in the bags for the i-th brother. Naturally, all these numbers should be distinct and be within limits from 1 to n2. You can print the numbers in the lines in any order. 

It is guaranteed that the solution exists at the given limits.

Examples

Input

2


Output

1 4
2 3

Note

The sample shows Gerald's actions if he has two brothers. In this case, his bags contain 1, 2, 3 and 4 candies. He can give the bags with 1 and 4 candies to one brother and the bags with 2 and 3 to the other brother.

Solution (in JAVA):

Solution:
import java.util.Scanner;
import java.lang.*;


public class temp{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    Integer i=0,j=0,k=0,n=sc.nextInt(),sum=0,numE=0,numO=0,temp=0;
    temp = n/2;
    for ( i =1 , j = 1;i<=n ;i++ , j = j + temp) {
      for ( k = j; k<j+temp ;k++ ) {
        System.out.print(k + " ");
      }
      for (k=n*n-j+1;k>n*n-j -temp+1 ; k--) {
        System.out.print(k + " ");
      }
      System.out.println();
    }

    // Integer[] a = new Integer [n];
    //
    // for (i=0;i<n ;i++ ) {
    //   a[i] = sc.nextInt();
    //   sum+=a[i];
    //   if (a[i]%2==1) {
    //     numO++;
    //   }
    //   else{
    //     numE++;
    //   }
    // }
    //
    // if (sum%2==1) {
    //   System.out.println(numO);
    // }
    // else{
    //   System.out.println(numE);
    // }





    //
    // for (i=0;i<n ;i++ ) {
    //   a[i] = sc.nextInt();
    //   if (a[i]>max) {
    //     max = a[i];
    //     amaz++;
    //   }
    //   if (a[i]<min) {
    //     min = a[i];
    //     amaz++;
    //   }
    // }
    //
    // String s = sc.next();
    // for (i=0;i<s.length() ;i++ ) {
    //   if ((s.charAt(i)=='H')||(s.charAt(i)=='Q')||(s.charAt(i)=='9')) {
    //     // j=1;
    //     System.out.println("YES");
    //     return ;
    //   }
    // }
    // System.out.println("NO");

    //  i = sc.nextInt();
    //
    // if (((i>=0)&&(i<11))||(i>21)) {
    //   System.out.println(0);
    // }
    // else if (i==20) {
    //   System.out.println(15);
    // }
    // else{
    //   System.out.println(4);
    //
    // }





    // String s1,s2,s3;
    // s1 = sc.next();
    // s2 = sc.next();
    // s3 = "";
    //
    // for (i = 0;i<s1.length() ; i++) {
    //   if (s1.charAt(i)==s2.charAt(i)) {
    //     s3 = s3 + "0";
    //   }
    //   else {
    //
    //     s3 = s3 + "1";
    //   }
    // }
    // System.out.println(s3);

    //,posR = 0,posC = 0,temp=0,flag=0;
    // for ( i = 0 ; i <5 ; i++ ) {
    //   for (j = 0; j<5 ;j++ ) {
    //     temp = sc.nextInt();
    //     if (temp == 1) {
    //       posR = i; posC = j;
    //       // flag = 1;
    //       // break;
    //     }
    //   }
    //   // if (flag == 1) {
    //   //   break;
    //   // }
    // }
    // System.out.println(Math.abs(2-posC)+Math.abs(2-posR));
    // n = sc.nextInt();
    // Integer n=0,i=0,maxPos=0,minPos=0,max=-1,min = 101;
    // Integer [] a = new Integer [n];
    // for (i=0;i<n ;i++ ) {
    //   a[i] = sc.nextInt();
    // }
    // minPos = n-1 ;
    // // System.out.println(minPos);
    //
    // for ( i = 0 ; i < n ; i++ ) {
    //   if (a[i]>max) {
    //     max = a[i];
    //     maxPos = i;
    //   }
    //   if (a[i]<=min) {
    //     min = a[i];
    //     minPos = i;
    //   }
    // }
    // System.out.println(maxPos);
    // System.out.println(minPos);
    // System.out.println(maxPos+((n-1)-minPos));

    // if (maxPos<=minPos) {
    //   System.out.println(maxPos+((n-1)-minPos));
    // }
    // if (maxPos>minPos) {
    //   System.out.println(maxPos+((n-1)-minPos) -1);
    // }
    // String s , test;

    // s = sc.next();
    //
    // int i=0,k=0,flag=0;
    // test = new String("hello");
    //
    // for ( i = 0; i < s.length(); i++) {
    //   if(s.charAt(i)==test.charAt(k)){
    //     k++;
    //     if (k==test.length()) {
    //       System.out.println("YES");
    //       flag = 1;
    //       break;
    //     }
    //   }
    // }
    // if (flag == 0) {
    //   System.out.println("NO");
    // }


    return ;
  }
}