#include <iostream>
#include <string>
#include <vector>

void printAsBinary(uint32_t a, int bitSize) {
    std::string output;
    for (int i = 0; i < bitSize; i++) {
        int bit = a & 1;
        a = a >> 1;
        output.insert(0, std::to_string(bit));
    }
    std::cout << output << std::endl;
}

bool findSolution1(std::vector<bool> &visited, int current, std::vector<int> &structures, int bitValue) {
    int maxBitValue = 1 << bitValue;
    if (structures.size() == maxBitValue) {
        for (auto i:structures)
            printAsBinary(i, bitValue);
        return true;
    } else {
        bool foundNew = false;
        int mask = 1;
        int newValue;
        while (true) {
            newValue = current | mask;
            if (!visited[newValue]) {
                foundNew = true;
                break;
            } else if (mask << 1 < maxBitValue) {
                mask = mask << 1;
            } else break;
        }
        if (foundNew) {
            visited[newValue] = true;
            structures.push_back(newValue);
            bool res = findSolution1(visited, newValue, structures, bitValue);
            structures.pop_back();
            visited[newValue] = false;
            return res;
        } else {
            for (int shiftCount = 1; shiftCount <= bitValue; shiftCount++) {
                int savedBits = 0;
                for (int i = 0; i < shiftCount - 1; i++) {
                    savedBits = (savedBits << 1) + 1;
                }
                savedBits = current & savedBits;
                newValue = ((current >> shiftCount) << shiftCount) + savedBits;
                if (!visited[newValue]) {
                    visited[newValue] = true;
                    structures.push_back(newValue);
                    bool res = findSolution1(visited, newValue, structures, bitValue);
                    structures.pop_back();
                    visited[newValue] = false;
                    if (res)
                        return res;
                }
            }
            return false;
        }
    }
}

bool isPow2(int a) {
    if (a == 0)
        return false;
    while (a) {
        if ((a & 1) == 1 && a != 1)
            return false;
        else
            a = a >> 1;
    }
    return true;
}


bool findSolution2(std::vector<bool> &visited, int current, std::vector<int> &structures, int bitValue) {
    int maxBitValue = 1 << bitValue;
    if (structures.size() == maxBitValue) {
        for (auto i:structures)
            printAsBinary(i, bitValue);
        return true;
    } else {
        for (int i = 2; i < maxBitValue; i++) {
            int checkValue = i ^ current;
            if (!visited[i] && isPow2(checkValue)) {
                visited[i] = true;
                structures.push_back(i);
                bool res = findSolution2(visited, i, structures, bitValue);
                structures.pop_back();
                visited[i] = false;
                if (res)
                    return res;
            }
        }
    }
    return false;
}


int main() {
    int n;
    std::cin >> n;
    std::vector<bool> visited(1 << n);
    visited[0] = true;
    visited[1] = true;
    std::vector<int> structures;
    structures.push_back(0);
    structures.push_back(1);
    findSolution2(visited, 1, structures, n);
    return 0;
}