#include <bits/stdc++.h>
#define mod 1000000007
#define mod998 998244353
#define sp ' '
#define intmax 2147483647
#define llmax 9223372036854775807
#define mkp make_pair
typedef long long ll;
using namespace std;

int N;
ll a[10][10], pow10[11];

int main() {
	cin >> N;
	pow10[0] = 1;
	for (int i = 1; i <= 10; ++i) {
		pow10[i] = pow10[i - 1] * 10;
	}
	for (int i = 0; i < N; ++i) {
		for (int j = i + 1; j < N; ++j) {
			a[i][j] = a[j][i] = pow10[i] * j;
		}
	}
	for (int i = 0; i < N; ++i) {
		for (int j = 0; j < N; ++j) {
			cout << a[i][j];
			if (j != N - 1)cout << sp;
		}
		cout << endl;
	}
}