#include <bits/stdc++.h>
using namespace std;
int s[30] = {0,  3,   5,   6,   7,   14,  22,  32,  42,  55,  76,
             88, 100, 145, 175, 205, 236, 289, 327, 390, 433, 492};
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == j)
        cout << 0 << " ";
      else
        cout << s[i] + s[j] << " ";
    }
    cout << endl;
  }
  return 0;
}
