#include "bits/stdc++.h"
using namespace std;

#define rep(i,a,b) for(int i = (a); i < (b); ++i)
#define all(x) begin(x),end(x)
#define sz(x) int(x.size())
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;

typedef pair<int,int> pi;
typedef vector<pi> vp;

vp merge(vp a, vp b){
    vector<pair<int,bool>> events;
    for(auto [l,r] : a){
        for(auto [l2,r2] : b){
            events.push_back({l+l2,0});
            events.push_back({r+r2+1,1});
        }
    }

    sort(all(events));

    int sm = 0;
    vp ans;
    int last = -1;
    for(auto e : events){
        if (e.second){
            sm -= 1;
            if (sm == 0){
                ans.push_back({last, e.first-1});
            }
        }else{
            sm += 1;
            if (sm == 1){
                last = e.first;
            }
        }
    }

    return ans;
}

const int N = 20;
int F[N];
vp dp[17];
vp inters[17];

int main(){
    // cin.tie(0)->sync_with_stdio(0);
    
    for(int n = 3; n < N; ++n){
        F[n] = 2*F[n-1] + (1<<n);
    }

    {
        dp[1] = vp{pi{0,0}}; 

        inters[1] = vp{pi{0,0}};
        for(int k = 2; k < 17; ++k){
            inters[k] = inters[k-1];
            inters[k].back().second += 4;

            inters[k].push_back(pi{F[k+1], F[k+1] + 4 * ((1<<(k-1))-1)});
            dp[k] = merge(inters[k], dp[k-1]);
            // cerr << dp[k].size() << endl;
            // cerr << dp[k][0].first << ' ' << dp[k][0].second << endl;
        }
    }

    int n,k; cin >> n >> k;
    while(n--){
        int h; cin >> h;

        if (h%4==0 and h <= dp[k].back().second){
            vi sol;

            for(int w = k; w >= 0 and h > 0; --w){
                auto it = prev(lower_bound(all(inters[w]), pi{h, 2e9}));
                int take = min(it->second, h);
                h -= take;
                sol.push_back(1<<(2 + (it - begin(inters[w]))));
            }

            cout << sz(sol) << ' ';
            for(auto c : sol) cout << c << ' ';
            cout << '\n';
        }else{
            cout << "-1\n";
        }
    }
}