#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long ca;
  cin >> ca;
  while (ca--) {
    long long n, i, j, k, l, r, m;
    cin >> l >> r >> m;
    for (i = l; i <= r; i++) {
      long long x1, x2;
      x1 = m / i;
      if (m % i != 0)
        x2 = m / i + 1;
      else
        x2 = m / i;
      long long y1 = m - (x1 * i);
      long long y2 = (x2 * i) - m;
      long long lim = r - l;
      if (y1 <= lim && x1 > 0) {
        cout << i << " " << l + y1 << " " << l << endl;
        break;
      }
      if (y2 <= lim && x2 > 0) {
        cout << i << " " << l << " " << l + y2 << endl;
        break;
      }
    }
  }
  return 0;
}
