#include <iostream>
using namespace std;
int n, a[10], d = 1;
void pr() {
cout<< d<< ": ";
for (int i = 0; i < n; i++)
cout << a[i]<< " ";
cout << endl;
d++;
}
void binary(int i) {
for (int j = 0; j <= 1; j++) {
a[i] = j;
if (i == n - 1)
pr();
else
binary(i + 1);
}
}
int main() {
cin >> n;
binary(0);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG4sIGFbMTBdLCBkID0gMTsKCnZvaWQgcHIoKSB7CiAgICBjb3V0PDwgZDw8ICI6ICI7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykKICAgICAgICBjb3V0IDw8IGFbaV08PCAiICI7CiAgICBjb3V0IDw8IGVuZGw7CiAgICBkKys7Cn0KCnZvaWQgYmluYXJ5KGludCBpKSB7CiAgICBmb3IgKGludCBqID0gMDsgaiA8PSAxOyBqKyspIHsKICAgICAgICBhW2ldID0gajsKICAgICAgICBpZiAoaSA9PSBuIC0gMSkKICAgICAgICAgICAgcHIoKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIGJpbmFyeShpICsgMSk7CiAgICB9Cn0KCmludCBtYWluKCkgewogICAgY2luID4+IG47CiAgICBiaW5hcnkoMCk7Cn0K