#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, l, r, m, i;
  cin >> t;
  while (t--) {
    cin >> l >> r >> m;
    if (m >= l) {
      for (i = l; i <= r; i++) {
        if (m % i <= r - l) {
          cout << i << " " << r << " " << r - (m % i) << "\n";
          break;
        } else {
          int d = m / i + 1;
          if (d * i - m <= r - l) {
            cout << i << " " << r - (d * i - m) << " " << r << "\n";
            break;
          }
        }
      }
    } else
      cout << l << " " << r - l + m << " " << r << "\n";
  }
}
