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

int main(){
	ios_base::sync_with_stdio(false), cin.tie(nullptr);
	int Q;
	cin >> Q;
	int K;
	cin >> K;
	vector<int> dp(K);
	dp[0] = 0;
	dp[1] = 12;
	for(int k = 2; k < K; k++){
		dp[k] = dp[k-1] + (((4 << k) * (k+1)) - 4);
	}
	while(Q--){
		int H;
		cin >> H;
		if(H % 4 != 0 || H > dp[K-1]){
			cout << -1 << '\n';
			continue;
		}
		vector<int> sizes;
		for(int i = K-1; i >= 0; i--){
			if(H >= ((4 << i) * i)){
				H -= min(H, ((4 << i) * (i+1)) - 4);
				sizes.push_back((4 << i));
			} else {
				for(int d = i-1; d >= 0; d--){
					if(H >= ((4 << d) * d)){
						H -= min(H, ((4 << d) * (d+1)));
						sizes.push_back((4 << d));
						break;
					}
				}
			}
		}
		cout << sizes.size();
		for(int a : sizes){
			cout << ' ' << a;
		}
		cout << '\n';
	}
}
