#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
using namespace std;
 
#define REP(i,n) for(ll i=0; i<n; ++i)
#define FOR(i,a,b) for(ll i=a; i<=b; ++i)
#define FORR(i,a,b) for (ll i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
 
int main() {
    int n;
    cin >> n;
    VVI a(n, VI(n-1));

    if (n == 2){
        cout << -1 << endl;
        return 0;
    }

    if (n % 2){
        REP(i,n){
            REP(j,n-1){
                a[i][j] = (i + j + 1) % n;
            }
        }
    }else{
        REP(i,n/2){
            REP(j,n-1) a[i][j] = (i + j + 1) % n;
        }
        FOR(i,n/2,n-1){
            REP(j,n/2-1) a[i][j] = (i + j + 1) % n;
            FOR(j,n/2-1,n-3) a[i][j] = (i + j + 2) % n;
            a[i][n-2] = (i + n/2) % n;
        }
    }


    REP(i,n){
        REP(j,n-1) cout << a[i][j]+1 << " ";
        cout << endl;
    }
    return 0;
}
### Prompt

Develop a solution in CPP to the problem described below:

There are N persons, conveniently numbered 1 through N. They will take 3y3s Challenge for N-1 seconds.

During the challenge, each person must look at each of the N-1 other persons for 1 seconds, in some order.

If any two persons look at each other during the challenge, the challenge ends in failure.

Find the order in which each person looks at each of the N-1 other persons, to be successful in the challenge.

Constraints

* 2 \leq N \leq 100

Input

The input is given from Standard Input in the following format:


N


Output

If there exists no way to be successful in the challenge, print `-1`.

If there exists a way to be successful in the challenge, print any such way in the following format:


A_{1,1} A_{1,2} ... A_{1, N-1}
A_{2,1} A_{2,2} ... A_{2, N-1}
:
A_{N,1} A_{N,2} ... A_{N, N-1}


where A_{i, j} is the index of the person that the person numbered i looks at during the j-th second.

Judging

The output is considered correct only if all of the following conditions are satisfied:

* 1 \leq A_{i,j} \leq N
* For each i, A_{i,1}, A_{i,2}, ... , A_{i, N-1} are pairwise distinct.
* Let X = A_{i, j}, then A_{X, j} \neq i always holds.

Examples

Input

7


Output

2 3 4 5 6 7
5 3 1 6 4 7
2 7 4 1 5 6
2 1 7 5 3 6
1 4 3 7 6 2
2 5 7 3 4 1
2 6 1 4 5 3


Input

2


Output

-1

### Response

```cpp
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
using namespace std;
 
#define REP(i,n) for(ll i=0; i<n; ++i)
#define FOR(i,a,b) for(ll i=a; i<=b; ++i)
#define FORR(i,a,b) for (ll i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
 
int main() {
    int n;
    cin >> n;
    VVI a(n, VI(n-1));

    if (n == 2){
        cout << -1 << endl;
        return 0;
    }

    if (n % 2){
        REP(i,n){
            REP(j,n-1){
                a[i][j] = (i + j + 1) % n;
            }
        }
    }else{
        REP(i,n/2){
            REP(j,n-1) a[i][j] = (i + j + 1) % n;
        }
        FOR(i,n/2,n-1){
            REP(j,n/2-1) a[i][j] = (i + j + 1) % n;
            FOR(j,n/2-1,n-3) a[i][j] = (i + j + 2) % n;
            a[i][n-2] = (i + n/2) % n;
        }
    }


    REP(i,n){
        REP(j,n-1) cout << a[i][j]+1 << " ";
        cout << endl;
    }
    return 0;
}
```