#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7, MAX = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long t;
  cin >> t;
  while (t--) {
    long long n, a = 1;
    cin >> n;
    vector<long long> ans;
    for (; a <= n; a *= 2) ans.push_back(a), n -= a;
    if (n) ans.push_back(n);
    cout << ans.size() - 1 << "\n";
    sort(ans.begin(), ans.end());
    for (a = 1; a < ans.size(); a++) cout << ans[a] - ans[a - 1] << " ";
    cout << "\n";
  }
  return 0;
}
