#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long tt;
  cin >> tt;
  while (tt--) {
    long long l, r, m;
    cin >> l >> r >> m;
    for (long long i = l; i <= r; ++i) {
      if (r - (i - m % i) >= l || r - m % i >= l) {
        if (r - m % i >= l && m % i != m)
          cout << i << " " << r << " " << r - m % i << "\n";
        else if (r - (i - m % i) >= l)
          cout << i << " " << r - (i - m % i) << " " << r << "\n";
        break;
      }
    }
  }
}
