#include <bits/stdc++.h>
using namespace std;
vector<long long> bad(100, 0);
vector<long long> get(long long n, long long base) {
  if (base > n) return bad;
  long long sum = 1;
  vector<long long> ans;
  n -= base + 1;
  for (long long i = base; i >= 1; i--) {
    long long t = min(n / i, sum);
    sum += t;
    n -= i * t;
    ans.push_back(t);
  }
  if (n) return bad;
  return ans;
}
void solve() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= 30; i++) {
    auto g = get(n, i);
    if (g != bad) {
      cout << g.size() << '\n';
      for (auto i : g) cout << i << ' ';
      cout << '\n';
      return;
    }
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  for (long long i = 0; i < t; i++) {
    solve();
  }
  return 0;
}
