#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
long long poww(long long a, long long b) {
  if (b == 0) return 1;
  long long ans = poww(a, b / 2);
  if (b % 2 == 0) return (ans * ans) % 1000000007;
  return (((ans * ans) % 1000000007) * a) % 1000000007;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long cur = 1;
    long long minn = 1;
    long long maxx = 2;
    long long ans = 0;
    vector<int> temp;
    while (cur < n) {
      long long start = minn;
      long long end = maxx;
      if (n - cur >= minn && n - cur <= maxx) {
        ans++;
        temp.push_back(n - cur - minn);
        break;
      }
      long long fin = minn;
      while (start <= end) {
        long long mid = (start + end) / 2;
        if (cur + 2 * mid <= n) {
          fin = mid;
          start = mid + 1;
        } else {
          end = mid - 1;
        }
      }
      ans++;
      temp.push_back(fin - minn);
      minn = fin;
      maxx = 2 * fin;
      cur += fin;
    }
    cout << ans << '\n';
    long long val = temp.size();
    for (long long i = 0; i < val; i++) cout << temp[i] << " ";
    cout << '\n';
  }
  return 0;
}
