#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;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IG1haW4oKQp7CiAgICB1bnNpZ25lZCBkaWdpdHM7CiAgICBzdGQ6OmNpbiA+PiBkaWdpdHM7CiAgICBmb3IodW5zaWduZWQgaSA9IDA7IGkgPCAoMSA8PCBkaWdpdHMpOyArK2kpCiAgICB7CiAgICAgICAgZm9yKHVuc2lnbmVkIGogPSBkaWdpdHM7IGogPiAwOyAtLWopCiAgICAgICAgewogICAgICAgICAgICBzdGQ6OmNvdXQgPDwgKChpID4+IChqIC0gMSkpICUgMikgPDwgIiAiOwogICAgICAgIH0KICAgICAgICBzdGQ6OmNvdXQgPDwgc3RkOjplbmRsOwogICAgfQp9Cg==