#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << "[ " << *it << " = " << a << " ] ";
  err(++it, args...);
}
int main() {
  long long int a, b, c, n, m, l, r;
  int t;
  scanf("%d", &(t));
  while (t--) {
    scanf("%lld %lld", &l, &r);
    scanf("%lld", &(m));
    for (a = l; a < r + 1; a++) {
      if (m % a == 0) {
        b = l, c = l;
        break;
      } else {
        n = (m / a);
        if (n) {
          if (m - (n * a) <= (r - l)) {
            c = l, b = l + (m - (n * a));
            break;
          }
          if ((n + 1) * a - m <= (r - l)) {
            b = l, c = l + ((n + 1) * a - m);
            break;
          }
        } else {
          if (a - m <= (r - l)) {
            b = l, c = l + (a - m);
            break;
          }
        }
      }
    }
    printf("%lld %lld %lld\n", a, b, c);
  }
  return 0;
}
