#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 a, b, c;
    long long int max = r - l;
    for (int i = l; i <= r; i++) {
      if (m / i > 0 && m % i <= max) {
        a = i;
        b = r;
        c = r - (m % i);
        break;
      } else if (i - (m % i) <= max) {
        a = i;
        c = r;
        b = r - i + (m % i);
        break;
      }
    }
    cout << a << " " << b << " " << c << "\n";
  }
  return 0;
}
