#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long have = 1, rem = n - 1;
    vector<long long> ans;
    while (rem >= 0) {
      if (have * 2 >= rem) {
        ans.push_back(rem - have);
        break;
      }
      long long x = min(rem / 2 - have, have);
      ans.push_back(x);
      have += x;
      rem -= have;
    }
    cout << ans.size() << "\n";
    for (auto &it : ans) cout << it << " ";
    cout << "\n";
  }
  return 0;
}
