#include <bits/stdc++.h>
using namespace std;
bool solve() {
  long long a = 0, b = 0, m = 0, n = 1, x[60] = {0};
  cin >> a >> b >> m;
  x[1] = a;
  for (int i = 2; i < 60; i++) {
    x[i] = 1;
    for (int j = i - 1; j >= 1; j--) x[i] += x[j];
    if (x[i] > b) break;
    n = i;
  }
  long long dif = b - x[n];
  for (int i = 2; i <= n; i++) {
    long long pw = (1ll << max(n - i - 1, 0ll));
    x[i] = min(m - 1, dif / pw);
    dif -= pw * x[i];
    x[i]++;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i - 1; j >= 1; j--) x[i] += x[j];
  }
  if (x[n] == b) {
    cout << n << ' ';
    for (int i = 1; i <= n; i++) cout << x[i] << ' ';
    cout << endl;
    return true;
  } else {
    cout << -1;
    cout << endl;
    return false;
  }
}
int main() {
  int q;
  cin >> q;
  while (q--) solve();
  return 0;
}
