#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    int cur = 1;
    vector<int> ans;
    while (1) {
      ans.push_back(n / cur);
      if (n / cur == 0) break;
      long long left = n - (n / cur) * cur;
      cur += left / (n / cur) + 1;
    }
    cout << ans.size() << endl;
    for (int i = ans.size() - 1; i >= 0; i--) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
