#include <bits/stdc++.h>
using namespace std;
long long Pow(long long x, long long y, long long m) {
  if (y == 0) return 1;
  long long p = Pow(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long i, j;
  long long t;
  cin >> t;
  while (t--) {
    long long l, r, m;
    cin >> l >> r >> m;
    vector<pair<long long, pair<long long, long long> > > ans;
    for (i = l; i <= r; i++) {
      long long x = m / i;
      if (x == 0) x = 1;
      long long diff = m - x * i;
      if (i - diff < diff) diff = -(i - diff);
      if (diff >= 0 && l + diff <= r)
        ans.push_back({i, {l + diff, l}});
      else if (diff < 0 && l + abs(diff) <= r)
        ans.push_back({i, {l, l + abs(diff)}});
      if (ans.size() > 0) {
        cout << ans[0].first << " " << ans[0].second.first << " "
             << ans[0].second.second << "\n";
        break;
      }
    }
  }
}
