#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
long long a, b, c, n, l, r, m;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    cin >> l >> r >> m;
    for (a = l; a <= r; a++) {
      n = m / a;
      if (n > 0 && m - n * a <= r - l) {
        b = r;
        c = n * a + b - m;
      } else {
        n++, b = l, c = n * a + b - m;
      }
      if (l <= c && c <= r) break;
    }
    cout << a << ' ' << b << ' ' << c << '\n';
  }
  return 0;
}
