#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
vector<long long> primes;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  primes.push_back(2);
  primes.push_back(3);
  primes.push_back(5);
  primes.push_back(7);
  primes.push_back(11);
  primes.push_back(17);
  primes.push_back(29);
  primes.push_back(37);
  primes.push_back(47);
  primes.push_back(59);
  int N;
  cin >> N;
  long long product = 1;
  long long maxsum = 0;
  for (long long i = 0; i < N; i++) product *= primes[i];
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (i == j)
        cout << 0;
      else {
        cout << product / primes[i] / primes[j];
        if (i == 0) maxsum += product / primes[i] / primes[j];
      }
      if (j != N - 1) cout << " ";
    }
    cout << endl;
  }
  cerr << maxsum << endl;
  return 0;
}
