#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int l, r, m;
    cin >> l >> r >> m;
    long long int p, q, s;
    q = l;
    for (long long int k = l; k <= r; k++) {
      long long int z = m % k;
      long long int y = k - z;
      if (q + y <= r) {
        s = q + y;
        p = k;
        break;
      } else if (q + z <= r) {
        s = q + z;
        p = k;
        int x;
        x = q;
        q = s;
        s = x;
        break;
      }
    }
    cout << p << " " << q << " " << s << endl;
  }
  return 0;
}
