#include <bits/stdc++.h>
using namespace std;
long long q, n, l, r, m, a, b, c;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> q;
  while (q--) {
    cin >> l >> r >> m;
    for (a = l; a <= r; a++) {
      if (m % a > r - l && a - m % a > r - l) {
        continue;
      }
      if (m % a <= r - l) {
        n = m / a;
        if (n > 0) {
          c = l;
          b = l + m % a;
          break;
        }
      }
      n = ((m / a) * a + a) / a;
      if (n > 0) {
        b = l;
        c = l + (a - m % a);
        break;
      }
    }
    cout << a << " " << b << " " << c << "\n";
  }
  return 0;
}
