#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const int MAXN = 3e6 + 123;
void faster() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
bool cmp(const string& a, const string& b) { return (a + b) < (b + a); }
pair<int, int> p[MAXN];
void solve() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 1; i <= n; i *= 2) {
    v.push_back(i);
    n -= i;
  }
  if (n > 0) {
    v.push_back(n);
    sort((v).begin(), (v).end());
  }
  cout << v.size() - 1 << endl;
  for (int i = 1; i < v.size(); i++) {
    cout << v[i] - v[i - 1] << ' ';
  }
  cout << endl;
}
int main() {
  int n = 1;
  cin >> n;
  while (n--) {
    solve();
  }
}
