#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void amin(T& a, T const& b) {
  a = min(a, b);
}
template <class T>
inline void amax(T& a, T const& b) {
  a = max(a, b);
}
inline long long square(long long x) { return x * x; }
inline long long gcd(long long a, long long b) {
  while (a) swap(a, b %= a);
  return b;
}
template <typename T>
inline T mod(T a, T b) {
  return ((a % b) + b) % b;
}
void solve(int N) {
  vector<long long> f(61);
  f[0] = 1;
  f[1] = 2;
  for (int i = 2; i < 61; ++i) f[i] = f[i - 1] + f[i - 2];
  vector<vector<long long>> u(N, vector<long long>(N, 0));
  int c = 0;
  for (int i = 0; i < (N)-1; ++i)
    for (int j = i + 1; j < (N); ++j) {
      u[i][j] = u[j][i] = f[8 + (c++)];
    }
  for (int i = 0; i < (N); ++i) {
    for (int j = 0; j < (N); ++j) {
      printf("%lld%c", u[i][j], (j == N - 1) ? '\n' : ' ');
    }
  }
}
int main() {
  int N;
  cin >> N;
  solve(N);
  return 0;
}
