#include <iostream>

int main()
{
    unsigned digits;
    std::cin >> digits;
    for(unsigned i = 0; i < (1 << digits); ++i)
    {
        for(unsigned j = digits; j > 0; --j)
        {
            std::cout << ((i >> (j - 1)) % 2) << " ";
        }
        std::cout << std::endl;
    }
}
