#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  switch (N) {
    case 2:
      cout << "0 33636694511" << endl;
      cout << "33636694511 0" << endl;
      break;
    case 3:
      cout << "0 1712977578 41368683102" << endl;
      cout << "1712977578 0 3456650595" << endl;
      cout << "41368683102 3456650595 0" << endl;
      break;
    case 4:
      cout << "0 17750572903 26337916001 33199548393" << endl;
      cout << "17750572903 0 21287366474 30439648453" << endl;
      cout << "26337916001 21287366474 0 10355155971" << endl;
      cout << "33199548393 30439648453 10355155971 0" << endl;
      break;
    case 5:
      cout << "0 11221066048 21265022649 24388741640 5272434343" << endl;
      cout << "11221066048 0 11926623671 11501908691 22002633607" << endl;
      cout << "21265022649 11926623671 0 422550884 19261772825" << endl;
      cout << "24388741640 11501908691 422550884 0 11796355187" << endl;
      cout << "5272434343 22002633607 19261772825 11796355187 0" << endl;
      break;
    case 6:
      cout << "0 5554969462 11312561363 11134739332 10368385770 2277247639"
           << endl;
      cout << "5554969462 0 2548309598 9443389302 6824856407 18217934227"
           << endl;
      cout << "11312561363 2548309598 0 6461074435 14863988396 3519687977"
           << endl;
      cout << "11134739332 9443389302 6461074435 0 17087615403 11669671863"
           << endl;
      cout << "10368385770 6824856407 14863988396 17087615403 0 4796367232"
           << endl;
      cout << "2277247639 18217934227 3519687977 11669671863 4796367232 0"
           << endl;
      break;
    case 7:
      cout << "0 8315633230 15940704241 11691453652 15855803547 952893230 "
              "2116951928"
           << endl;
      cout << "8315633230 0 947761104 2463761982 14563241815 13763366514 "
              "2143701260"
           << endl;
      cout << "15940704241 947761104 0 15407328047 3046322319 14867276330 "
              "4340372983"
           << endl;
      cout << "11691453652 2463761982 15407328047 0 10993969060 12828469317 "
              "7587660903"
           << endl;
      cout << "15855803547 14563241815 3046322319 10993969060 0 14037909211 "
              "8341560313"
           << endl;
      cout << "952893230 13763366514 14867276330 12828469317 14037909211 0 "
              "8487691775"
           << endl;
      cout << "2116951928 2143701260 4340372983 7587660903 8341560313 "
              "8487691775 0"
           << endl;
      break;
    case 8:
      cout << "0 4403940453 7941497497 3252531479 2075079356 14011128459 "
              "9133376227 10702483093"
           << endl;
      cout << "4403940453 0 10688689266 8078525639 3685207306 2424383395 "
              "7220377952 8596413102"
           << endl;
      cout << "7941497497 10688689266 0 8418972372 9274807052 11239778494 "
              "13133298253 9831618115"
           << endl;
      cout << "3252531479 8078525639 8418972372 0 12709998903 3673623022 "
              "14053685742 7644468874"
           << endl;
      cout << "2075079356 3685207306 9274807052 12709998903 0 10473948220 "
              "14211696446 348306353"
           << endl;
      cout << "14011128459 2424383395 11239778494 3673623022 10473948220 0 "
              "1619316063 5167873801"
           << endl;
      cout << "9133376227 7220377952 13133298253 14053685742 14211696446 "
              "1619316063 0 12158120194"
           << endl;
      cout << "10702483093 8596413102 9831618115 7644468874 348306353 "
              "5167873801 12158120194 0"
           << endl;
      break;
    case 9:
      cout << "0 5121359820 2637471811 1666811951 3379816469 10065518808 "
              "2345031428 7150530230 11812727271"
           << endl;
      cout << "5121359820 0 6755982720 6156190291 6130623526 8342581689 "
              "1569395535 1646040295 7137911091"
           << endl;
      cout << "2637471811 6755982720 0 2984288776 7800441627 5536486357 "
              "11802615702 1548635316 3973831172"
           << endl;
      cout << "1666811951 6156190291 2984288776 0 5006436271 4006903434 "
              "3337405286 9382676598 11474987521"
           << endl;
      cout << "3379816469 6130623526 7800441627 5006436271 0 10435011120 "
              "10109215076 3738753963 9271477559"
           << endl;
      cout << "10065518808 8342581689 5536486357 4006903434 10435011120 0 "
              "12098335923 7604239123 10885908377"
           << endl;
      cout << "2345031428 1569395535 11802615702 3337405286 10109215076 "
              "12098335923 0 347946028 10756626487"
           << endl;
      cout << "7150530230 1646040295 1548635316 9382676598 3738753963 "
              "7604239123 347946028 0 4923639524"
           << endl;
      cout << "11812727271 7137911091 3973831172 11474987521 9271477559 "
              "10885908377 10756626487 4923639524 0"
           << endl;
      break;
    case 10:
      cout << "\\(^o^)/" << endl;
      break;
  }
  return 0;
}
