#include <bits/stdc++.h>
using namespace std;
long long int lr_fact(long long int n, long long int l, long long int r) {
  for (long long int d = l; d * d <= n && d <= r; d++) {
    if (n % d == 0) {
      return d;
    }
  }
  for (long long int d = max(1ll, (n - 1) / r + 1); d * d <= n && d * l <= n;
       d++) {
    if (n % d == 0) {
      return n / d;
    }
  }
  return 0;
}
void solve(long long int l, long long int r, long long int m) {
  for (long long int n = max(1ll, m - r + l); n <= m + r - l; n++) {
    long long int a = lr_fact(n, l, r);
    if (a) {
      long long int rem = m - n;
      if (rem < 0) {
        long long int b = l;
        long long int c = b - rem;
        cout << a << " " << b << " " << c << endl;
        ;
      } else {
        long long int c = l;
        long long int b = c + rem;
        cout << a << " " << b << " " << c << endl;
      }
      return;
    }
  }
}
int main() {
  int cases;
  cin >> cases;
  for (int i = 0; i < cases; i++) {
    long long int l, r, m;
    cin >> l >> r >> m;
    solve(l, r, m);
  }
}
