#include <bits/stdc++.h>
using namespace std;
long long n, h, d;
map<long long, long long> ump;
long long road[243][234];
int main() {
  srand(time(0));
  cin >> n;
  vector<long long> bef;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n; j++) {
      while (1) {
        long long x = rand() * rand();
        if (ump[x]) continue;
        for (int k = 0; k < bef.size(); k++)
          ump[x + bef[k]] = ump[bef[k] - x] = ump[x - bef[k]] = 1;
        bef.push_back(x);
        road[i][j] = x;
        break;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      cout << (road[j][i] | road[i][j]) << " ";
    }
    cout << "\n";
  }
  return 0;
}
