#include <bits/stdc++.h>
using namespace std;
char _;
long long t;
long long a, b, m, s;
vector<long long> out;
bool check(long long sz) {
  out.clear();
  long long B = b;
  B -= (1LL << sz) * a;
  out.push_back(a);
  for (long long l = sz + 1 - 1; l >= 0; --l) {
    long long t = max(0LL, l - 1);
    long long tmp = min(m, B / (1LL << t));
    B -= (tmp) * (1LL << t);
    if (tmp == 0) {
      if (m == 1) {
        return 0;
      }
      if (l == 0)
        tmp = 1;
      else
        tmp = 2;
      long long pos, curr;
      for (pos = (long long)(out.size()) - 1, curr = 0; pos > 0 && curr == 0;
           --pos) {
        out[pos]--;
        curr = out[pos];
        if (out[pos] == 0) out[pos] = 2;
      }
      if (curr == 0) return 0;
    }
    out.push_back(tmp);
  }
  if (B != 0) return 0;
  return 1;
}
void run() {
  scanf("%lli%lli%lli", &a, &b, &m);
  if (a == b) {
    printf("1 %lli\n", a);
    return;
  }
  long long sz = 0;
  for (; (1LL << sz) * a <= b; ++sz) {
    if (check(sz)) {
      long long s = 0;
      printf("%i ", out.size());
      for (long long l = 0; l < out.size(); ++l) {
        cout << out[l] + s << ' ';
        s = s * 2 + out[l];
      }
      printf("\n");
      return;
    }
  }
  printf("-1\n");
}
int32_t main() {
  cin >> t;
  while (t--) {
    run();
  }
  return 0;
}
