#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void ckmax(T& x, T y) {
  x = (y > x ? y : x);
}
template <typename T>
inline void ckmin(T& x, T y) {
  x = (y < x ? y : x);
}
long long L, R, M;
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> L >> R >> M;
    long long r = M - (L - R);
    long long l = M - (R - L);
    for (long long a = L; a <= R; ++a) {
      long long n = r / a;
      if (n * a >= l) {
        long long d = M - n * a;
        for (long long b = L; b <= R; ++b) {
          if (d - b >= -R && d - b <= -L) {
            cout << a << " " << b << " " << b - d << endl;
            break;
          }
        }
        break;
      }
    }
  }
  return 0;
}
