#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long MOD = 1000000007;
long long INF = 100100100100100;
long long a[50];
long long ans[13][13];
signed main() {
  a[1] = 1, a[2] = 2;
  for (long long i = 3; i <= 44; i++) {
    a[i] = a[i - 1] + a[i - 2];
  }
  for (long long i = 0; i <= 8; i++) {
    for (long long j = 1; i + j <= 9; j++) {
      if (j == 1) {
        if (i == 0)
          ans[0][1] = 1;
        else
          ans[i][i + 1] = ans[i - 1][i] * a[11 - i];
      } else
        ans[i][i + j] = ans[i][i + 1] * a[j];
    }
  }
  long long ima = 0;
  for (long long i = 0; i < 10; i++) {
    for (long long j = 0; j < 10; j++) {
      if (i > j) ans[i][j] = ans[j][i];
    }
  }
  long long n;
  cin >> n;
  for (long long i = 0; i < (long long)(n); i++) {
    for (long long j = 0; j < (long long)(n); j++) cout << ans[i][j] << " ";
    cout << endl;
  }
  return 0;
}
