#include <bits/stdc++.h>
std::mt19937_64 rng(
    std::chrono::steady_clock::now().time_since_epoch().count());
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long l, r, m;
    cin >> l >> r >> m;
    long long b, c;
    if (m <= l) {
      cout << l << " " << r - l + m << " " << r << "\n";
      continue;
    }
    for (long long i = l; i <= r; i++) {
      if (m % i == 0) {
        cout << i << " " << l << " " << l << "\n";
        break;
      } else {
        long long x = m % i;
        long long y = i - x;
        if (((m - x) / i) > 0 && (l + x) <= r) {
          b = l + x;
          c = l;
          cout << i << " " << b << " " << c << "\n";
          break;
        } else if (((m + y) / i) > 0 && (l + y) <= r) {
          b = l;
          c = l + y;
          cout << i << " " << b << " " << c << "\n";
          break;
        }
      }
    }
  }
  return 0;
}
