int tests;
cin >> tests;
while (tests-- > 0)
{
int N;
cin >> N;
vector <int> answer;
for (int i = 1; i <= N; i *= 2)
{
answer.push_back(i);
N -= i;
}
if (N > 0)
{
answer.push_back(N);
sort(all(answer));
}
cout << answer.size() - 1 << "\n";
for (int i = 1;i < answer.size();++i)
cout << answer[i] - answer[i - 1] << " ";
cout << "\n";
}