#include <bits/stdc++.h>
using namespace std;
void enable_comma() {}
string tostring(char c);
string tostring(long long x);
template <class A, class B>
string tostring(pair<A, B> p);
template <class A>
string tostring(vector<A> v);
string tostring(char c) {
  string s = "";
  s += c;
  return s;
}
string tostring(string s) { return "\"" + s + "\""; }
string tostring(char *c) { return tostring((string)c); }
string tostring(long long x) {
  if (x < 0) return "-" + tostring(-x);
  if (x > 9)
    return tostring(x / 10) + tostring(char('0' + x % 10));
  else
    return tostring(char('0' + x));
}
string tostring(int x) { return tostring((long long)x); }
string tostring(unsigned long long x) {
  if (x > 9)
    return tostring((long long)(x / 10)) + tostring(char('0' + x % 10));
  else
    return tostring(char('0' + x));
}
string tostring(unsigned x) { return tostring((long long)x); }
string tostring(double x) {
  static char res[114];
  sprintf(res, "%lf\n", x);
  return tostring(res);
}
string tostring(long double x) { return tostring((double)x); }
template <class A, class B>
string tostring(pair<A, B> p) {
  return "(" + tostring(p.first) + "," + tostring(p.second) + ")";
}
template <class A>
string tostring(vector<A> v) {
  string res = "{";
  for (int i = (0); i <= ((int)v.size() - 1); i++) {
    res += tostring(v[i]);
    res += i == (int)v.size() - 1 ? "}" : ",";
  }
  if (res == "{") res += "}";
  return res;
}
template <class A>
string tostring(A a, int L, int R) {
  string res = "{";
  for (int i = (L); i <= (R); i++) {
    res += tostring(a[i]);
    res += i == R ? "}" : ",";
  }
  if (res == "{") res += "}";
  return res;
}
string tostrings() { return ""; }
template <typename Head, typename... Tail>
string tostrings(Head H, Tail... T) {
  return tostring(H) + " " + tostrings(T...);
}
long long read() {
  long long x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f = ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return f ? -x : x;
}
template <class T>
void ckmax(T &x, const T y) {
  if (x < y) x = y;
}
template <class T>
void ckmin(T &x, const T y) {
  if (x > y) x = y;
}
const int N = 233;
int n;
long long g[N][N];
namespace test {
void main() {
  unordered_map<long long, int> vis;
  vector<int> id(n);
  iota(id.begin(), id.end(), 1);
  do {
    long long now = 0;
    for (int i = (1); i <= ((int)id.size() - 1); i++)
      now += g[id[i - 1]][id[i]];
    if ((++vis[now]) > 2)
      (!(0) ? cout << "Assertion failed!" << endl
                   << "function: " << __FUNCTION__ << endl
                   << "line: " << 161 << endl
                   << "expression: "
                   << "0" << endl,
       exit(3), 0 : 1);
  } while (next_permutation(id.begin(), id.end()));
}
}  // namespace test
int main() {
  n = read();
  g[n - 1][n] = 1;
  for (int i = (n - 2); i >= (1); i--) {
    for (int j = (i + 2); j <= (min(n, i + 3)); j++) g[i][n] += g[i + 1][j];
    if (i == n - 2) g[i][n]++;
    g[i][n - 1] = g[i][n] + g[i + 1][i + 2] + g[i + 1][i + 4] + g[i + 1][i + 5];
    for (int j = (n - 2); j >= (i); j--)
      g[i][j] = g[i][j + 1] + g[i][j + 2] + g[i][n];
  }
  for (int i = (1); i <= (n); i++)
    for (int j = (i + 1); j <= (n); j++) g[j][i] = g[i][j];
  for (int i = (1); i <= (n); i++) {
    for (int j = (1); j <= (n); j++) printf("%lld ", g[i][j]);
    puts("");
  }
  test::main();
  return 0;
}
