/**
 *    author:  tourist
 *    created: 05.11.2025 20:04:54
**/
#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) 42
#endif

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int tt, k;
  cin >> tt >> k;
  vector<int> low(k + 2), high(k + 2);
  high[2] = 4;
  for (int i = 3; i <= k + 1; i++) {
    low[i] = low[i - 1] * 2 + (1 << i);
    high[i] = high[i - 1] * 2 + (1 << i);
  }
  while (tt--) {
    int h;
    cin >> h;
    if (h % 4 != 0) {
      cout << -1 << '\n';
      continue;
    }
    vector<int> ans(k);
    for (int i = 0; i < k; i++) {
      for (int x = k + 1 - i; x >= 2; x--) {
        if (h >= low[x]) {
          int lim = high[x] - (x == k + 1 - i ? 4 : 0);
          h -= min(h, lim);
          ans[i] = x;
          break;
        }
      }
    }
    if (h != 0) {
      cout << -1 << '\n';
    } else {
      cout << k;
      for (int x : ans) {
        cout << " " << (1 << x);
      }
      cout << '\n';
    }
  }
  return 0;
}
