#include <bits/stdc++.h>
#pragma GCC omptimize("unroll-loops")
#pragma optimize("SEX_ON_THE_BEACH")
using namespace std;
using ll = long long int;
using ull = unsigned long long int;
using dd = long double;
using ldd = long double;
using si = short int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
ll get_seed(string s) {
  ll ans = 0;
  for (int i = 0; i < s.size(); ++i) ans += s[i];
  return ans;
}
void solve() {
  0;
  ;
  ll a, b, m;
  cin >> a >> b >> m;
  vector<ll> arr = {a};
  while (arr.back() < b) {
    ll s = 0;
    for (ll i : arr) s += i;
    arr.push_back(s + 1);
  }
  if (arr.back() == b) {
    cout << arr.size() << " ";
    for (ll i : arr) cout << i << " ";
    cout << '\n';
    return;
  }
  arr.pop_back();
  for (int i = 1; i < arr.size(); ++i) {
    0;
    ;
    ll need = arr.back() - b;
    need *= -1;
    0;
    ;
    vector<ll> a(arr.size());
    a[i] = 1;
    for (int j = i + 1; j < arr.size(); ++j) {
      for (int k = 0; k < j; ++k) {
        a[j] += a[k];
      }
    }
    0;
    ;
    need /= a.back();
    need = min(need, m - 1);
    0;
    ;
    a[i] = need;
    for (int j = i + 1; j < arr.size(); ++j) {
      a[j] = 0;
      for (int k = 0; k < j; ++k) a[j] += a[k];
    }
    for (int i = 0; i < arr.size(); ++i) arr[i] += a[i];
  }
  if (arr.back() == b) {
    cout << arr.size() << " ";
    for (ll i : arr) cout << i << " ";
  } else {
    cout << -1;
  }
  cout << '\n';
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) solve();
  return 0;
}
