#include <bits/stdc++.h>
using namespace std;
const int sz = 60;
long long pow2[sz];
void solve(long long a, long long b, long long m) {
  int maxn = 55;
  for (int q = maxn; q > 0; q--) {
    long long cur = 0;
    vector<long long> r(q, 1);
    r[0] = a;
    vector<long long> coef(q, 1);
    for (int i = 0; i < q - 1; i++) {
      coef[i] = pow2[q - i - 2];
    }
    for (int i = 0; i < q; i++) {
      cur += coef[i] * r[i];
      if (coef[i] * r[i] < 0) {
        cur = -1;
        break;
      }
    }
    if (cur > b || cur < 0) continue;
    for (int i = 1; i < q; i++) {
      long long left = 1;
      long long right = m;
      long long mid;
      while (left <= right) {
        mid = (left + right) / 2;
        if (cur + (mid - 1) * coef[i] <= b && cur + (mid - 1) * coef[i] > 0) {
          r[i] = mid;
          left = mid + 1;
        } else {
          right = mid - 1;
        }
      }
      cur += (r[i] - 1) * coef[i];
    }
    if (cur == b) {
      cout << q << " ";
      long long sum = 0;
      for (int i = 0; i < q; i++) {
        long long pre = sum;
        sum += r[i];
        cout << sum << " ";
        sum += pre;
      }
      cout << "\n";
      return;
    }
  }
  cout << "-1\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int q;
  cin >> q;
  pow2[0] = 1;
  for (int i = 1; i < sz; i++) {
    pow2[i] = pow2[i - 1] * 2;
  }
  while (q--) {
    long long a, b, m;
    cin >> a >> b >> m;
    solve(a, b, m);
  }
  return 0;
}
