#include <bits/stdc++.h>
using namespace std;
int pot[20] = {1,  2,  3,   5,   8,   13,  21,  30,  39,  53,
               74, 95, 128, 152, 182, 212, 258, 349, 428, 413};
int main() {
  int N;
  while (cin >> N) {
    for (int i = 0; i < (int)(N); ++i) {
      for (int j = 0; j < (int)(N); ++j) {
        if (j) printf(" ");
        printf("%d", (i == j) ? 0 : pot[i] + pot[j]);
      }
      puts("");
    }
  }
}
