#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[15][15];
long long f[] = {0, 1, 2, 4, 7, 12, 20, 33, 54, 88, 143};
int main(void) {
  cin >> n;
  a[1][2] = a[2][1] = 1;
  for (int i = 3; i <= n; i++) {
    for (int x = 1; x <= i - 1; x++) {
      for (int y = 1; y <= i - 1; y++) {
        a[x][y] *= f[i];
      }
    }
    for (int j = 1; j < i; j++) {
      a[i][j] = a[j][i] = f[j];
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      cout << a[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}
