1. int tests;

  2. cin >> tests;

    1. while (tests-- > 0)

    2. {

      1. int N;

      2. cin >> N;

      3. vector <int> answer;

      4. for (int i = 1; i <= N; i *= 2)

      5. {

        1. answer.push_back(i);

        2. N -= i;

      6. }

      7. if (N > 0)

      8. {

        1. answer.push_back(N);

        2. sort(all(answer));

      9. }

      10. cout << answer.size() - 1 << "\n";

      11. for (int i = 1;i < answer.size();++i)

        1. cout << answer[i] - answer[i - 1] << " ";

      12. cout << "\n";

    3. }