#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RREP(i, n) for (int i = (int)(n); i >= 0; i--)
#define rep(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rrep(i, a, n) for (int i = (a); i >= (int)(n); i--)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
using ll = long long;
using vi = vector<int>;
using vii = vector<vector<int>>;
using P = pair<int, int>;
template<class T> inline bool chmin(T& a, T b) { if ( a > b ) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if ( a < b ) { a = b; return true; } return false; }

int main() {
    int N;
    cin >> N;
    vii vec(N,vi(N));
    REP(i,N) REP(j,N) {
        if(j < N-i-1) continue;
        else if (i%2 == 0 && vec[i][j-1] == 0) vec[i][j] = 1;
        else vec[i][j] = 2;
    }

    REP(i,N) {
        REP(j,N) {
            cout << vec[i][j];
        }
        cout << endl;
    }
    return 0;
}