#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int a[] = {0, 1, 2, 4, 7, 12, 20, 29, 38, 52, 73};
long long w[15][15];
long long d[15][15];
void work() {
  int n = read();
  w[1][2] = w[2][1] = 1;
  for (register int i = (int)(3); i <= (int)(n); i++) {
    long long s = 0;
    for (register int x = (int)(1); x <= (int)(i - 1); x++)
      for (register int y = (int)(x + 1); y <= (int)(i - 1); y++) s += w[x][y];
    for (register int x = (int)(1); x <= (int)(i - 1); x++)
      w[x][i] = w[i][x] = s * a[x];
  }
  for (register int i = (int)(1); i <= (int)(n); i++) {
    for (register int j = (int)(1); j <= (int)(n); j++)
      printf("%lld ", w[i][j]);
    puts("");
  }
}
int main() { work(); }
