#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int t;
  cin >> t;
  while (t--) {
    long long int l, r, m;
    cin >> l >> r >> m;
    long long int diff = r - l;
    long long int flag = 0;
    long long int i;
    for (i = l; i <= r; i++) {
      if (m % i == 0) {
        flag = 1;
        break;
      }
      if ((i - m % i) <= diff) {
        flag = 2;
        break;
      }
      if (m % i <= diff) {
        flag = 3;
        break;
      }
    }
    if (flag == 1) cout << i << " " << l << " " << l << endl;
    if (flag == 2) cout << i << " " << l << " " << l + (i - m % i) << endl;
    if (flag == 3) cout << i << " " << l + m % i << " " << l << endl;
  }
  return 0;
}
