#include <bits/stdc++.h>
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    int idx = 0;
    vector<long long> a;
    while (n) {
      if (n >= 1LL << idx) {
        a.push_back(1LL << idx);
        n -= 1LL << idx;
      } else {
        a.push_back(n);
        break;
      }
      idx++;
    }
    sort((a.begin()), (a.end()));
    vector<int> ans(a.size() - 1);
    for (int i = 0; i < (int)(ans.size()); i++) ans[i] = a[i + 1] - a[i];
    cout << ans.size() << "\n";
    for (int i = 0; i < (int)(ans.size()); i++) {
      if (i > 0) cout << " ";
      cout << ans[i];
    }
    cout << "\n";
  }
  return 0;
}
