#include <bits/stdc++.h>
using namespace std;
long long pow(long long n, int a) {
  if (a == 0) return 1;
  long long m = n;
  a--;
  while (a--) {
    n *= m;
  }
  return n;
}
void solve(long long n) {
  vector<int> nums;
  int i = 0;
  while (n >= pow(2, i)) {
    n -= pow(2, i);
    nums.push_back(pow(2, i));
    i++;
  }
  if (n > 0) {
    nums.push_back(n);
    sort(nums.begin(), nums.end());
  }
  cout << nums.size() - 1 << endl;
  for (int i = 1; i <= nums.size() - 1; i++) {
    cout << nums[i] - nums[i - 1] << " ";
  }
  cout << endl;
}
int main() {
  int t;
  long long n;
  cin >> t;
  while (t--) {
    cin >> n;
    solve(n);
  }
}
