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.io.*;
import java.util.*;

public class A_Candy_Bags {
    double PI = 3.141592653589793238462643383279502884197169399375105820974944;
    int MOD = 1000000007;

    public static void main(String[] args) {
        FastScanner f = new FastScanner();

        int n=f.ri();
        int arr[][]=new int[n][n];

        for(int i=1;i<=n*n;i++){
            arr[(i-1)%n][(i-1)/n]=i;
        }
        for(int i=1;i<n;i++){
            shift(arr[i],i);
        }
        // System.out.println(Arrays.deepToString(arr)); 
        // int start=0;
        for(int i=0;i<n;i++){
           for(int j=0;j<n;j++){
               System.out.print(arr[j][i]+" ");
           }
           System.out.println();
        }
        

    }

    public static void shift(int arr[],int k){
        if(k==0){
            return;
        }
        else{
            int n=arr.length;
            int cp[]=new int[n];
            for(int i=0;i<n;i++){
                cp[i]=arr[(i+k)%n];
            }
            for(int i=0;i<n;i++){
                arr[i]=cp[i];
            }
        }
    }

    // any other class you make,make it static.

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String rs() {
            while (!st.hasMoreTokens())
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int ri() {
            return Integer.parseInt(rs());
        }

        int[] rarr(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = ri();
            return a;
        }

        long rl() {
            return Long.parseLong(rs());
        }
    }

    static void sort(int[] a) {
        ArrayList<Integer> l = new ArrayList<>();
        for (int i : a)
            l.add(i);
        Collections.sort(l);
        for (int i = 0; i < a.length; i++)
            a[i] = l.get(i);
    }

    static int gcd(int a, int b) {
        return (b == 0) ? a : gcd(b, a % b);
    }

    static long ncr(int n, int k) // note it returns long
    {
        if (k > n - k) {
            k = n - k;
        }
        long c[] = new long[k + 1];
        c[0] = 1;
        for (int i = 1; i <= n; i++) {
            for (int j = Math.min(i, k); j > 0; j--) {
                c[j] = c[j] + c[j - 1];
                // c[j]=c[j]%(1000000000+7);when asked or int is used instead of long
            }
        }
        return c[k];
    }

    public void nextPermutation(int[] nums) {
        int mark = -1;
        for (int i = nums.length - 1; i > 0; i--) {
            if (nums[i] > nums[i - 1]) {
                mark = i - 1;
                break;
            }
        }

        if (mark == -1) {
            reverse(nums, 0, nums.length - 1);
            return;
        }

        int idx = nums.length - 1;
        for (int i = nums.length - 1; i >= mark + 1; i--) {
            if (nums[i] > nums[mark]) {
                idx = i;
                break;
            }
        }

        swap(nums, mark, idx);

        reverse(nums, mark + 1, nums.length - 1);
    }

    public void swap(int[] nums, int i, int j) {
        int t = nums[i];
        nums[i] = nums[j];
        nums[j] = t;
    }

    public void reverse(int[] nums, int i, int j) {
        while (i < j) {
            swap(nums, i, j);
            i++;
            j--;
        }
    }

}