#include <bits/stdc++.h>
using namespace std;
long long n, h, d;
map<long long, long long> ump;
long long val[14];
int main() {
  srand(time(0));
  cin >> n;
  vector<long long> bef;
  for (int i = 1; i <= n; i++) val[i] = rand() + 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (i == j)
        cout << 0 << " ";
      else
        cout << val[i] * val[j] << " ";
    }
    cout << "\n";
  }
  return 0;
}
