Problem: Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd.

Input

The only line contains odd integer n (1 ≤ n ≤ 49).

Output

Print n lines with n integers. All the integers should be different and from 1 to n2. The sum in each row, column and both main diagonals should be odd.

Examples

Input

1


Output

1


Input

3


Output

2 1 4
3 5 7
6 9 8

Solution (in JAVA):

Solution:
import java.io.*;
import java.lang.*;
import java.text.DecimalFormat;
import java.util.*;
import java.math.*;

// Sachin_2961 submission //
public class CodeforcesA {

    public void solve() {
        int n = fs.nInt();
        int m = n/2 , odd = 1, even = 2;
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                if( abs(i-m)+abs(j-m) <= m){
                    out.print(odd+" ");odd+=2;
                }else{
                    out.print(even+" ");even+=2;
                }
            }
            out.println();
        }
    }

    static boolean multipleTestCase = false; static FastScanner fs; static PrintWriter out;
    public void run(){
        fs = new FastScanner();
        out = new PrintWriter(System.out);
        int tc = (multipleTestCase)?fs.nInt():1;
        while (tc-->0)solve();
        out.flush();
        out.close();
    }
    static long max(long a,long b){ return Math.max(a,b);}
    static long min(long a,long b){ return Math.min(a,b);}
    static long abs(long a){return Math.abs(a);}
    public static void main(String[]args){
        try{
            new CodeforcesA().run();
        }catch (Exception e){
            e.printStackTrace();
        }

    }
    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String n() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }
        String Line()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
        int nInt() {return Integer.parseInt(n()); }
        long nLong() {return Long.parseLong(n());}
        int[]aI(int n){
            int[]ar = new int[n];
            for(int i=0;i<n;i++)
                ar[i] = nInt();
            return ar;
        }
    }
}