#include <iostream>
#include <vector>

using namespace std;

const int nmax = 1 << 12;
int n;
bool viz[nmax + 1];
vector < int > g[nmax + 1];

void dfs (int nod) {
    viz[ nod ] = 1;
    for (int i = n - 1; i >= 0; -- i) {
        if (nod & (1 << i)) cout << "1";
        else cout << "0";
    }
    cout << "\n";

    for (int i = 0; i < (int)g[ nod ].size(); ++ i) {
        if(!viz[ g[ nod ][ i ] ])
            dfs( g[ nod ][ i ] );
    }
}

int main() {
    cin.sync_with_stdio(false);
    cin >> n;

    for (int i = 0; i < (1 << n); ++ i) {
        for (int j = 0; j < n; ++ j) {
            int x = i ^ (1 << j);

            /// de la j la x
            g[ i ].push_back( x );
        }
    }

    dfs(0);

    return 0;
}