#include <bits/stdc++.h>
using namespace std;
const int mod = 19260817;
const long long m2 = 1e11;
int n, a[15][15];
map<long long, int> mp;
long long fact() {
  long long ret = 0, x, y, z;
  while (mp[ret]) {
    x = rand(), y = rand(), z = rand();
    ret = x * y % mod * z % m2 + 1;
  }
  return ret;
}
int main() {
  mp[0] = 1;
  srand(time(NULL));
  scanf("%d", &n);
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++) a[i][j] = a[j][i] = fact();
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) printf("%lld ", a[i][j]);
    puts("");
  }
}
