#include <bits/stdc++.h>
inline long long read() {
  long long x = 0;
  char c = getchar(), f = 1;
  for (; c < '0' || '9' < c; c = getchar())
    if (c == '-') f = -1;
  for (; '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  return x * f;
}
inline void write(long long x) {
  static int buf[20], len;
  len = 0;
  if (x < 0) x = -x, putchar('-');
  for (; x; x /= 10) buf[len++] = x % 10;
  if (!len)
    putchar('0');
  else
    while (len) putchar(buf[--len] + '0');
}
inline void writeln(long long x) {
  write(x);
  putchar('\n');
}
inline void writesp(long long x) {
  write(x);
  putchar(' ');
}
long long cnt[30], base[30], now[30];
long long mp[15][15];
int n;
int main() {
  n = read();
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++) ++cnt[i + j];
  base[1] = 1;
  for (int i = 2; i <= 2 * n; i++) base[i] = base[i - 1] * (cnt[i - 1] + 1);
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++) {
      now[i + j] += base[i + j];
      mp[i][j] = mp[j][i] = now[i + j];
    }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) writesp(mp[i][j]);
    putchar('\n');
  }
  return 0;
}
