#include <bits/stdc++.h>
using namespace std;
vector<int> f() {
  vector<int> v;
  set<int> s;
  auto ok = [&](const int i) {
    if (s.count(i)) return false;
    for (int x : v)
      if (s.count(x + i)) return false;
    return true;
  };
  for (int i = 1; (int)v.size() < 10; ++i)
    if (ok(i)) {
      s.insert(i);
      for (int x : v) s.insert(x + i);
      v.push_back(i);
    }
  return v;
}
long long M[11][11];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr), cout.tie(nullptr);
  int n;
  cin >> n;
  M[1][2] = 1;
  const vector<int> v = f();
  for (int i = 3; i <= n; ++i) {
    long long mx = 0;
    for (int i = 0; i <= n; ++i) mx = max(mx, *max_element(M[i], M[i] + 11));
    for (int j = 1; j < i; ++j) M[i][j] = (mx + 1) * v[j - 1];
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) cout << max(M[i][j], M[j][i]) << ' ';
    cout << endl;
  }
  return 0;
}
