#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
template <class T>
inline bool MX(T &l, const T &r) {
  return l < r ? l = r, 1 : 0;
}
template <class T>
inline bool MN(T &l, const T &r) {
  return l > r ? l = r, 1 : 0;
}
int N;
int dd[114][114];
signed main() {
  cin >> N;
  int idx = 0;
  for (int(i) = 1; (i) < (N); ++(i)) {
    for (int(j) = i + 1; (j) < (N); ++(j)) {
      dd[i][j] = dd[j][i] = idx++;
    }
  }
  for (int(i) = 0; (i) < (N); ++(i)) {
    for (int(j) = 0; (j) < (N); ++(j)) {
      if (j) cout << " ";
      if (i == j)
        cout << 0;
      else if (i == 0) {
        cout << (100000000000LL - j);
      } else if (j == 0) {
        cout << (100000000000LL - i);
      } else
        cout << (1LL << dd[i][j]);
    }
    cout << "\n";
  }
}
