#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 1;
long long n, i, res(0), j, a[maxn], q, t[maxn], r;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> q;
  n = 50;
  t[1] = 1;
  for (int i = 2; i <= n; ++i)
    for (int j = 1; j < i; ++j) t[i] += t[j];
  while (q--) {
    long long l, r, limit;
    cin >> l >> r >> limit;
    int i;
    if (l == r)
      cout << "1 " << l << "\n";
    else {
      vector<long long> test(n + 1, 0);
      test[1] = l;
      for (i = 2; i <= n; ++i) {
        for (int j = 1; j < i; ++j) test[i] += test[j];
        test[i]++;
        if (test[i] > r) break;
      }
      i--;
      long long need = r - test[i];
      int have = i;
      vector<long long> ans(i);
      vector<long long> mo(i, 0);
      for (int i = 0; i < ans.size(); ++i) ans[i] = test[i + 1];
      for (int i = 1; i < ans.size(); ++i) {
        long long remain = need / t[have - i];
        long long l = 1, r = limit - 1;
        if (r > remain) r = remain;
        need -= r * t[have - i];
        mo[i] = r;
      }
      if (need > 0)
        cout << "-1\n";
      else {
        cout << ans.size() << " ";
        for (int i = 0; i < ans.size(); ++i) {
          for (int j = i; j < ans.size(); ++j) ans[j] += mo[i] * t[j - i + 1];
          cout << ans[i] << ' ';
        }
        cout << "\n";
      }
    }
  }
}
