#include <bits/stdc++.h>
using namespace std;
long long int ans[12][12];
long long int fib[12];
void make() {
  fib[0] = 1;
  fib[1] = 2;
  for (int i = 2; i < 12; i++) fib[i] = fib[i - 1] + fib[i - 2];
  long long int mul = 1;
  ans[0][0] = 0;
  for (int i = 1; i < 12; i++) {
    ans[i][i] = 0;
    for (int j = 0; j < i; j++) ans[i][j] = ans[j][i] = fib[j] * mul;
    mul *= fib[i];
    mul++;
  }
}
int main() {
  make();
  int n;
  scanf("%d", &n);
  long long int mx = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      printf("%lld ", ans[i][j]);
      mx = max(mx, ans[i][j]);
    }
    puts("");
  }
  return 0;
}
