#include <bits/stdc++.h>
using namespace std;
const long long int E = 1e18 + 7;
const long long int MOD = 1000000007;
template <typename T, typename U>
istream &operator>>(istream &i, pair<T, U> &A) {
  i >> A.first >> A.second;
  return i;
}
template <typename T>
istream &operator>>(istream &i, vector<T> &A) {
  for (auto &I : A) {
    i >> I;
  }
  return i;
}
template <typename T, typename U>
ostream &operator<<(ostream &o, pair<T, U> &A) {
  o << A.first << " " << A.second;
  return o;
}
template <typename T>
ostream &operator<<(ostream &o, vector<T> &A) {
  long long int i = A.size();
  for (auto &I : A) {
    o << I << (--i ? " " : "");
  }
  return o;
}
template <typename T>
vector<T> &cset(vector<T> &A, T e = T()) {
  for (auto &I : A) {
    I = e;
  }
  return A;
}
int main() {
  vector<long long int> first(100, 1);
  for (int i = 2; i < 100; i++) {
    first[i] = first[i - 1] + first[i - 2];
  }
  long long int cnt = 1;
  long long int n;
  cin >> n;
  vector<vector<long long int>> edge(n, vector<long long int>(n, 0));
  vector<long long int> A;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      edge[i][j] = edge[j][i] = i + j + (first[cnt] + 10000);
      A.push_back(i + j + (first[cnt] + 10000));
      cnt++;
    }
  }
  for (auto &I : edge) {
    cout << I << endl;
  }
  sort(A.begin(), A.end(), greater<long long int>());
  long long int sum = 0;
  for (int i = 0; i < n; i++) {
    sum += A[i];
  }
  return 0;
}
