#include <bits/stdc++.h>
using namespace std;

vector<string> ret(int n) {
    if(n == 1) {
        vector<string> ans = {"0", "1"};
        return ans;
    }
    
    vector<string> ans;

    vector<string> a = ret(n - 1);
    vector<string> b = a;
    reverse(b.begin(), b.end());

    for(auto temp : a) {
        string t = "0";
        t += temp;
        ans.push_back(t);
    }

    for(auto temp : b) {
        string t = "1";
        t += temp;
        ans.push_back(t);
    }

    return ans;
}

int main() {
    int n; cin >> n;
    vector<string> sol = ret(n);

    for(auto temp : sol) {
        cout << temp << "\n";
    }
}