#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll Mod = 1000000007;
int main() {
  int T;
  cin >> T;
  for (int t = 0; t < T; t++) {
    ll l, r, m;
    ll a, b, c;
    cin >> l >> r >> m;
    bool exist = false;
    ll d[r + 1];
    for (ll i = l; i <= r; i++) {
      d[i] = m % i;
    }
    for (ll i = l; i <= r; i++) {
      if (d[i] <= (r - l)) {
        a = i;
        b = r;
        c = r - d[i];
        if (m + c - b > 0) {
          break;
        }
      }
      if (d[i] >= i - (r - l)) {
        a = i;
        b = r - (i - d[i]);
        c = r;
        if (m + c - b > 0) {
          break;
        }
      }
    }
    cout << a << " " << b << " " << c << endl;
  }
  return 0;
}
