#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<vector<long long>> ans(n, vector<long long>(n, 0));
  vector<double> p;
  int c = 0;
  vector<bool> so(100000, true);
  so[0] = so[1] = false;
  for (int i = (2); i < (100000); i++) {
    if (so[i]) {
      p.push_back(i);
      c++;
      if (c >= n * (n - 1) / 2) break;
      for (int j = i + i; j < 100000; j += i) so[j] = false;
    }
  }
  int x = 0;
  long long keisu = 2000000000;
  long long hiku = log(sqrt(2)) * keisu;
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (n); j++) {
      if (i == j)
        ans[i][j] = 0;
      else if (i < j) {
        ans[i][j] = log(p[x]) * keisu - hiku + 1;
        x++;
      } else {
        ans[i][j] = ans[j][i];
      }
    }
  }
  for (int i = 0; i < (n); i++) {
    for (int j = 0; j < (n); j++) {
      cout << ans[i][j] << " ";
    }
    cout << endl;
  }
  return 0;
}
