#include <bits/stdc++.h>
using namespace std;
long long T, a, b, n, m, ans, num[200100], cf[60], f[60];
string str = "aeiou";
inline void Min(long long &u, long long v) {
  if (v < u) u = v;
}
inline void Max(long long &u, long long v) {
  if (v > u) u = v;
}
int main() {
  long long i, j, p, q, sum;
  f[0] = f[1] = 1;
  for (i = 2; i <= 50; i++) f[i] = f[i - 1] * 2;
  cin >> T;
  while (T--) {
    memset(cf, 0, sizeof(cf));
    scanf("%lld%lld%lld", &a, &b, &m);
    if (a == b) {
      printf("1 %lld\n", a);
      continue;
    }
    num[1] = sum = a;
    for (n = 1; num[n] <= b;) num[++n] = sum + 1, sum += num[n];
    n--, sum = b - num[n];
    for (i = 2; i <= n; i++) {
      long long t = min(sum / f[n - i], m - 1);
      cf[i] = t;
      sum -= t * f[n - i];
    }
    if (sum)
      puts("-1");
    else {
      printf("%lld %lld ", n, a);
      sum = a;
      for (i = 2; i <= n; i++) {
        num[i] = sum + cf[i] + 1;
        printf("%lld ", num[i]);
        sum += num[i];
      }
      puts("");
    }
  }
}
