#include <bits/stdc++.h>
using namespace std;
void solve(long long l, long long r, long long m) {
  long long up = m + r - l, lo = m - r + l;
  bool f = 0;
  long long A, N;
  for (long long i = l; i <= r && !f; i++) {
    long long lb = 1, ub = 1e10, a;
    while (lb < ub) {
      long long mid = (lb + ub) / 2;
      a = i * mid;
      if (a > up)
        ub = mid;
      else if (a < lo)
        lb = mid + 1;
      else {
        f = 1;
        A = i, N = mid;
        break;
      }
    }
    if (f) break;
  }
  long long x = A * N;
  long long c, b;
  if ((m - x) < 0)
    b = l;
  else
    b = r;
  cout << A << " " << b << " " << b - (m - x) << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  long long l, r, m;
  while (t--) {
    cin >> l >> r >> m;
    solve(l, r, m);
  }
  return 0;
}
