Problem: Diverta City is a new city consisting of N towns numbered 1, 2, ..., N.

The mayor Ringo is planning to connect every pair of two different towns with a bidirectional road. The length of each road is undecided.

A Hamiltonian path is a path that starts at one of the towns and visits each of the other towns exactly once. The reversal of a Hamiltonian path is considered the same as the original Hamiltonian path.

There are N! / 2 Hamiltonian paths. Ringo wants all these paths to have distinct total lengths (the sum of the lengths of the roads on a path), to make the city diverse.

Find one such set of the lengths of the roads, under the following conditions:

* The length of each road must be a positive integer.
* The maximum total length of a Hamiltonian path must be at most 10^{11}.

Constraints

* N is a integer between 2 and 10 (inclusive).

Input

Input is given from Standard Input in the following format:


N


Output

Print a set of the lengths of the roads that meets the objective, in the following format:


w_{1, 1} \ w_{1, 2} \ w_{1, 3} \ ... \ w_{1, N}
w_{2, 1} \ w_{2, 2} \ w_{2, 3} \ ... \ w_{2, N}
:  :     :
w_{N, 1} \ w_{N, 2} \ w_{N, 3} \ ... \ w_{N, N}


where w_{i, j} is the length of the road connecting Town i and Town j, which must satisfy the following conditions:

* w_{i, i} = 0
* w_{i, j} = w_{j, i} \ (i \neq j)
* 1 \leq w_{i, j} \leq 10^{11} \ (i \neq j)



If there are multiple sets of lengths of the roads that meet the objective, any of them will be accepted.

Examples

Input

3


Output

0 6 15
6 0 21
15 21 0


Input

4


Output

0 111 157 193
111 0 224 239
157 224 0 258
193 239 258 0

Solution (in CPP):

Solution:
#include <iostream>
#include <string>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <ctime>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <assert.h>
#include <iomanip>
#include <bitset>
using namespace std;
#define vi vector<int>
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define SZ(x) (int)(x.size())
#define rep(i,a,b) for(int i=a;i<b;i++)
#define per(i,a,b) for(int i=b-1;i>=a;i--)
#define inf 1000000007
#define mod 1000000007
#define x first
#define y second
#define pi acos(-1.0)
#define DBG(x) cerr<<(#x)<<"="<<x<<"\n";

#define FOREACH(it,x) for(__typeof(x.begin()) it=x.begin();it!=x.end();it++)
#define ull unsigned long long
#define ll long long
#define N 1000005

template <class T,class U>inline void Max(T &a,U b){if(a<b)a=b;}
template <class T,class U>inline void Min(T &a,U b){if(a>b)a=b;}

//FILE* outFile;

inline void add(int &a,int b){a+=b;while(a>=mod)a-=mod;}
inline int gcd(int a, int b){if(b == 0)return a; return gcd(b, a%b);}
int pow(int a,int b){
    int ans=1;
    while(b){
        if(b&1)ans=ans*(ll)a%mod;
        a=(ll)a*a%mod;b>>=1;
    }
    return ans;
}

const int M = 11;
ll a[11][11], f[11];
int id[11];
int main(){
    int j,k,i,T,ca=0, m = 0, K = 0, n;
    scanf("%d", &n);
    f[0] = 1, f[1] = 2;
    map<int, int>use;
    rep(i, 2, M){
        rep(j, 0, i){
            use[f[j]] = 1;
            rep(k, 0, j)use[f[j] + f[k]] = 1;
        }
        f[i] = 3;
        while(1){
            int ok = !use[f[i]];
            rep(j, 0, i)ok &= !use[f[j] + f[i]];
            if(ok)break;
            f[i]++;
        }
    }
    ll mul = 1;
    rep(i, 1, M){
        rep(j, 0, i)a[i][j] = a[j][i] = f[j] * mul;
        if(i==1)mul <<= 1;
        else{
            mul *= f[i-2] + f[i-1];
            mul++;
        }
    }
    /*
    map<ll, int>cnt;
    int ok = 0;
    ll mx = 1e11;
    rep(i, 0, n)id[i] = i;
    ok = 1;
    do{
        ll sum = 0;
        rep(i, 1, n){
            sum += a[id[i-1]][id[i]];
        }
        cnt[sum]++;
        if(cnt[sum] > 2 || sum > mx){ok = 0;break;}
    }while(next_permutation(id, id+n));
    */
    rep(i, 0, n){
        rep(j, 0, n)printf("%lld ", a[i][j]);
        puts("");
    }
}