#include <bits/stdc++.h>
using namespace std;
int t;
long long n;
vector<int> ans;
int main() {
  std::ios::sync_with_stdio(0);
  std::cin.tie(0);
  while (cin >> t) {
    while (t--) {
      cin >> n;
      long long sum = 1;
      long long cnt = 1;
      ans.clear();
      while (true) {
        if (sum + cnt * 2 == n) {
          ans.push_back(cnt);
          break;
        } else if (sum + cnt * 2 < n) {
          ans.push_back(cnt);
          sum += cnt * 2;
          cnt *= 2;
        } else if (sum + cnt == n) {
          ans.push_back(0);
          break;
        } else if (sum + cnt < n) {
          ans.push_back(n - sum - cnt);
          break;
        } else {
          ans.pop_back();
          sum -= cnt;
          cnt /= 2;
          long long res = n - sum;
          ans.push_back(res / 2 - cnt);
          ans.push_back(res % 2);
          break;
        }
      }
      cout << ans.size() << '\n';
      for (auto v : ans) cout << v << " ";
      cout << '\n';
    }
  }
  return 0;
}
