#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long l, r, m;
    cin >> l >> r >> m;
    long long i, a, b, c;
    for (i = l; i <= r; i++) {
      a = i;
      long long div = (m / a);
      long long rem = m % a;
      if (r - l >= rem && div != 0) {
        b = r;
        c = r - rem;
        break;
      } else if (r - l >= a - rem) {
        c = r;
        b = r - (a - rem);
        break;
      }
    }
    cout << a << " " << b << " " << c << endl;
  }
  return 0;
}
