#include "bits/stdc++.h" using namespace std; #define DEBUG(x) cout<<#x<<": "< #define vl vector #define vii vector< vector > #define vll vector< vector > #define vs vector #define pii pair #define pis pair #define psi pair #define pll pair #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define in(x, a, b) (a <= x && x < b) #define all(c) c.begin(),c.end() const int inf = 1000000001; const ll INF = 2e18; const ll MOD = 1000000007; //const ll mod = 1000000009; const double pi = 3.14159265358979323846; #define Sp(p) cout<> k; for (ll n = 2; n <= 30; n++) { for (ll m = 2; m <= n; m++) { if (m*(m - 1) / 2 * pow(2, n - m) == k) { rep(i, m) { cout << 1 << " "; } rep(i, n - m) { cout << 0 << " "; } cout << endl; return 0; } } } }