#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, a, i, b, j, k, t, x, y, z, tc, u, v, w;
  cin >> tc;
  while (tc--) {
    cin >> x >> y >> n;
    v = n + y - x;
    long long k = y - x;
    for (i = x; i <= y; i++) {
      u = v / i;
      if (u > 0 && i * u >= n - k && i * u <= n + k) {
        cout << i << " ";
        t = n - i * u;
        if (t >= 0)
          cout << x + t << " " << x << endl;
        else
          cout << x << " " << x - t << endl;
        break;
      }
    }
  }
}
