#include #include #include using namespace std; int main() { int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0; int k; cin >> k; for ( a = 2; a <= 30; a++) { b = a - 1; if (k%(a*b)==0) { c = k / (a*b); if (!(c & (c - 1))) { while (c != 1) { cout << "0 "; c /= 2; } cout << "0 "; break; } } } for ( b = 0; b < a; b++) { cout << "1 "; } return 0; }