#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)1e9 + 7;
const long long inf = (long long)1e16;
const long double eps = 1e-12;
const long long N = (long long)2e5 + 5;
const long long LOGN = 19;
const long double PI = 3.14159265358979323846;
inline long long mul(long long a, long long b, long long m = mod) {
  return (long long)(a * b) % m;
}
inline long long add(long long a, long long b, long long m = mod) {
  a += b;
  if (a >= m) a -= m;
  if (a < 0) a += m;
  return a;
}
inline long long power(long long a, long long b, long long m = mod) {
  if (b == 0) return 1;
  if (b == 1) return (a % m);
  long long x = power(a, b / 2, m);
  x = mul(x, x, m);
  if (b % 2) x = mul(x, a, m);
  return x;
}
long long pw[51];
void pre() {
  pw[0] = 1;
  for (long long i = 1; i < 51; i++) pw[i] = pw[i - 1] * 2ll;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  if (0) {
    freopen("C:\\Users\\Dishant\\Desktop\\Collection-DEV c++\\input.txt", "r",
            stdin);
    freopen("C:\\Users\\Dishant\\Desktop\\Collection-DEV c++\\output.txt", "w",
            stdout);
  }
  long long t;
  cin >> t;
  pre();
  while (t--) {
    long long a, b, m;
    cin >> a >> b >> m;
    if (a == b) {
      cout << "1 " << a << endl;
      continue;
    }
    long long term = 1, prv = 1;
    long long dp[51];
    dp[1] = 0;
    dp[2] = 1;
    for (long long i = 3; i <= 50; i++) {
      dp[i] = 1 + prv;
      prv += dp[i];
    }
    bool ok = false;
    long long coeffs[55];
    for (long long i = 1; i <= 50; i++) {
      term = i;
      long long rem = b - pw[i - 1] * a;
      long double lb = (long double)dp[i + 1],
                  ub = (long double)dp[i + 1] * (long double)m;
      if (rem < lb) {
        ok = false;
        break;
      }
      if (rem >= lb && rem <= ub) {
        for (long long j = 0; j < i; j++) {
          coeffs[j] = 1;
          if (j == 0)
            rem--;
          else {
            rem -= pw[j - 1];
          }
        }
        if (rem == 0) {
          ok = true;
          break;
        }
        long long cval = 1;
        if (i >= 2) cval = pw[i - 2];
        for (long long j = i - 1; j >= 0; j--) {
          if (j == 0)
            cval = 1;
          else
            cval = pw[j - 1];
          long long can = rem / cval;
          can = min(can, m - 1);
          rem -= can * cval * 1ll;
          coeffs[j] += can;
        }
        if (rem == 0) {
          ok = true;
          break;
        }
      }
    }
    if (!ok) {
      cout << "-1\n";
      continue;
    }
    cout << term + 1 << ' ';
    cout << a << ' ';
    long long cans = a;
    for (long long i = 0; i < term; i++) {
      long long to = cans + coeffs[term - i - 1];
      cans += to;
      cout << to << ' ';
    }
    cout << endl;
  }
  return 0;
}
