#include <bits/stdc++.h>
using namespace std;
int T;
const int maxn = 55;
long long ans[maxn];
long long Ans[maxn];
int main() {
  scanf("%d", &T);
  while (T--) {
    long long a, b, m;
    scanf("%lld%lld%lld", &a, &b, &m);
    if (a == b) {
      printf("1 %lld\n", a);
      continue;
    }
    memset(ans, 0, sizeof ans);
    bool f = 0;
    int cnt;
    for (int i = 1; i <= 50 && !f; i++) {
      for (int j = 0; j <= 52; j++) ans[j] = 0;
      long long c = b - (i - 2 < 0 ? (1ll) : (1ll << (i - 2))) * a;
      if (c <= 0) break;
      if (c > (i - 2 < 0 ? (1ll) : (1ll << (i - 2))) * m) continue;
      if (i > 1) c -= (i - 2 < 0 ? (1ll) : (1ll << (i - 2)));
      if (c < 0) break;
      for (int j = 1; j <= i - 1; j++) ans[j] = 1;
      for (int j = i - 3; j >= -1 && c; j--) {
        ans[i - 2 - j] += min(c / (j < 0 ? (1ll) : (1ll << (j))), m - 1);
        c = c - min(c / (j < 0 ? (1ll) : (1ll << (j))), m - 1) *
                    (j < 0 ? (1ll) : (1ll << (j)));
      }
      if (c == 0ll) {
        cnt = i;
        f = 1;
        break;
      }
    }
    if (!f)
      puts("-1");
    else {
      Ans[1] = a;
      for (int i = 1; i < cnt; i++) {
        long long sum = 0;
        for (int j = 1; j <= i; j++) sum += Ans[j];
        Ans[i + 1] = sum + ans[i];
      }
      printf("%d ", cnt);
      for (int i = 1; i <= cnt; i++) printf("%lld ", Ans[i]);
      puts("");
    }
  }
  return 0;
}
