#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
void solve() {
  int q;
  cin >> q;
  while (q--) {
    ll a, b, m;
    cin >> a >> b >> m;
    if (a == b) {
      cout << 1 << '\n' << a << '\n';
      continue;
    }
    ll r[52];
    memset(r, -1, sizeof r);
    bool flag = 0;
    for (int i = 1; i < 50; ++i) {
      ll low = (a + 1) << (i - 1);
      if (low > b) break;
      ll high = (a + m) << (i - 1);
      if (b <= high) {
        flag = 1;
        ll pow = (1LL << (i - 1));
        ll rem = b - low;
        for (int pos = 1; pos <= i; ++pos) {
          pow /= 2;
          if (pow == 0) pow = 1;
          r[pos] = 1;
          if (pow) {
            r[pos] += min(m - 1, rem / pow);
            rem -= pow * (r[pos] - 1);
            rem = max(rem, 0LL);
          }
        }
        cout << i + 1 << '\n';
        r[0] = a;
        for (int pos = 0; pos <= i; ++pos) {
          for (int pos2 = 0; pos2 < pos; ++pos2) r[pos] += r[pos2];
          cout << r[pos] << ' ';
        }
        cout << '\n';
        break;
      }
    }
    if (!flag) cout << -1 << '\n';
  }
}
void InputSetup() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int main(void) {
  auto start = chrono::high_resolution_clock::now();
  InputSetup();
  solve();
  auto finish = chrono::high_resolution_clock::now();
  cerr << "Time elapsed: "
       << (chrono::duration<long double>(finish - start)).count() << "s\n";
}
