#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 500;
const long long mod = 1e9 + 7;
const long long cmod = 998244353;
const long long inf = 1LL << 61;
const int M = 1e6 + 500;
const long long int ths = 1LL << 40;
const int NN = 5e3 + 6;
void solve() {
  long long int n;
  cin >> n;
  for (int i = 1; i <= 32; i++) {
    long long int r = n - 1 - i;
    long long int mx = 1;
    vector<long long int> ans;
    for (int j = i; j >= 1; j--) {
      long long int mn = min(r / j, mx);
      mx += mn;
      ans.push_back(mn);
      r -= (j * mn);
    }
    if (!r) {
      cout << i << '\n';
      for (auto it : ans) cout << it << ' ';
      break;
    }
  }
  cout << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
