#include <bits/stdc++.h>
using namespace std;
const int maxn = 12;
inline char gc() {
  return getchar();
  static const int maxs = 1 << 16;
  static char buf[maxs], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, maxs, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long rd() {
  long long x = 0;
  char c = gc();
  bool neg = 0;
  while (c < '0' || c > '9') {
    if (c == '-') neg = 1;
    c = gc();
  }
  while (c >= '0' && c <= '9') x = (x << 1) + (x << 3) + c - '0', c = gc();
  return neg ? (~x + 1) : x;
}
int f[maxn] = {0, 1, 2, 3, 5, 8, 13, 21, 34, 56}, N;
long long ans[maxn][maxn];
int main() {
  N = rd();
  long long now = 1;
  for (int i = N - 1; i; i--) {
    for (int j = i + 1; j <= N; j++) {
      ans[i][j] = ans[j][i] = f[j - i] * now;
    }
    now *= f[N - i] + 1;
  }
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= N; j++) printf("%lld%c", ans[i][j], " \n"[j == N]);
  return 0;
}
