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 <bits/stdc++.h>
using namespace std;

int main(){
    int N;
    scanf("%d", &N);

    // N <= 9 can be easily solved using random weights. Only N=10 requires more thought

    if(N == 2){
        printf("0 4200782951\n4200782951 0\n");
    }else if(N == 3){
        printf("0 595392113 3485670742\n595392113 0 3993409801\n3485670742 3993409801 0\n");
    }else if(N == 4){
        printf("0 111 157 193\n111 0 224 239\n157 224 0 258\n193 239 258 0");
    }else if(N == 5){
        printf("0 1120293596 1363411275 2695033576 291754917\n1120293596 0 2777187166 3912821471 2792178619\n1363411275 2777187166 0 1790344584 1794788877\n2695033576 3912821471 1790344584 0 3404614660\n291754917 2792178619 1794788877 3404614660 0\n");
    }else if(N == 6){
        printf("0 1547419313 3678796810 3419032095 2383395373 269101889\n1547419313 0 4137780530 2312578763 822741678 489322228\n3678796810 4137780530 0 3434072510 2267928371 2446355330\n3419032095 2312578763 3434072510 0 1926732053 439765232\n2383395373 822741678 2267928371 1926732053 0 1621238000\n269101889 489322228 2446355330 439765232 1621238000 0\n");
    }else if(N == 7){
        printf("0 3685533898 3309879430 42521343 2314944944 1256565514 3820379386\n3685533898 0 1757633705 3297135931 3791422498 2957445228 146685956\n3309879430 1757633705 0 1643871611 2850559186 466341128 984219233\n42521343 3297135931 1643871611 0 4125620415 3732072487 4009228811\n2314944944 3791422498 2850559186 4125620415 0 585048619 2998838566\n1256565514 2957445228 466341128 3732072487 585048619 0 4134564458\n3820379386 146685956 984219233 4009228811 2998838566 4134564458 0\n");
    }else if(N == 8){
        printf("0 563875800 1225318167 2972645697 1289032234 1129116426 1831367910 2475552129\n563875800 0 2369444361 83802213 2990813968 848577381 3881659247 2855810912\n1225318167 2369444361 0 1604039992 2940918157 4175936479 2816444489 635132575\n2972645697 83802213 1604039992 0 2614553284 3914586299 3796326189 3899806310\n1289032234 2990813968 2940918157 2614553284 0 1763008100 3401272316 3602081843\n1129116426 848577381 4175936479 3914586299 1763008100 0 3276476006 3466646881\n1831367910 3881659247 2816444489 3796326189 3401272316 3276476006 0 4253168046\n2475552129 2855810912 635132575 3899806310 3602081843 3466646881 4253168046 0\n");
    }else if(N == 9){
        printf("0 2941370754 4046762338 300037691 408459189 3602734362 3184708449 795303870 1201486887\n2941370754 0 3179271189 1947889707 2557790900 715944681 355015879 1729791022 459441371\n4046762338 3179271189 0 1691113181 3767977083 739061260 3307313601 56212245 1439886185\n300037691 1947889707 1691113181 0 2599344567 3766080836 2407782913 3448394576 232010982\n408459189 2557790900 3767977083 2599344567 0 215332527 1807157280 2069476376 3939369296\n3602734362 715944681 739061260 3766080836 215332527 0 3755033663 3219425845 4237361776\n3184708449 355015879 3307313601 2407782913 1807157280 3755033663 0 364719491 2967029607\n795303870 1729791022 56212245 3448394576 2069476376 3219425845 364719491 0 1739274572\n1201486887 459441371 1439886185 232010982 3939369296 4237361776 2967029607 1739274572 0\n");
    }else if(N == 10){
        // This one came from the explanation from Xellos in the Codeforces discussion page
        // I coded the idea and obtained this.
        printf("0 1 2 4 7 12 20 33 54 88\n1 0 143 286 572 1001 1716 2860 4719 7722\n2 143 0 12584 25168 50336 88088 151008 251680 415272\n4 286 12584 0 679536 1359072 2718144 4756752 8154432 13590720\n7 572 25168 679536 0 22424688 44849376 89698752 156972816 269096256\n12 1001 50336 1359072 22424688 0 448493760 896987520 1793975040 3139456320\n20 1716 88088 2718144 44849376 448493760 0 5381925120 10763850240 21527700480\n33 2860 151008 4756752 89698752 896987520 5381925120 0 37673475840 11855313354\n54 4719 251680 8154432 156972816 1793975040 10763850240 37673475840 0 28284057711\n88 7722 415272 13590720 269096256 3139456320 21527700480 11855313354 28284057711 0\n");
    }
}