#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<string.h>

#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define NDEBUG
#define eprintf(...) do {} while (0)
#endif
#include<cassert>

using namespace std;

typedef long long LL;
typedef vector<int> VI;

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define EACH(i,c) for(__typeof((c).begin()) i=(c).begin(),i##_end=(c).end();i!=i##_end;++i)

template<class T> inline void amin(T &x, const T &y) { if (y<x) x=y; }
template<class T> inline void amax(T &x, const T &y) { if (x<y) x=y; }
template<class Iter> void rprintf(const char *fmt, Iter begin, Iter end) {
    for (bool sp=0; begin!=end; ++begin) { if (sp) putchar(' '); else sp = true; printf(fmt, *begin); }
    putchar('\n');
}

int N;
LL W[12][12];

void MAIN() {
    vector<int> v;
    v.push_back(1);
    v.push_back(2);
    while (v.size() <= 10) {
	int m = v.rbegin()[0] + v.rbegin()[1];
	v.push_back(m+1);
    }

//#ifdef LOCAL
//    rprintf("%d", v.begin(), v.end());
//#endif

    scanf("%d", &N);
    W[0][1] = W[1][0] = 0;
    for (int s=2; s<N; s++) {
	REP (i, s) REP (j, s) W[i][j] *= v[s]-1;
	REP (i, s) W[i][s] = W[s][i] = v[s-1-i];
    }
    REP (i, N) REP (j, N) if (i != j) W[i][j]++;
    REP (i, N) rprintf("%lld", W[i], W[i]+N);
}

int main() {
    int TC = 1;
//    scanf("%d", &TC);
    REP (tc, TC) MAIN();
    return 0;
}

