#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 1e6 + 10, M = 1e3 + 10;
const long long INF = 1e17;
const long long inf = 0x3f3f3f3f;
const double eps = 1e-6;
string str = "abacaba";
int cal(string s) {
  int len = s.size();
  int cnt = 0;
  for (int i = 0; i < len - 6; i++) {
    if (s.substr(i, 7) == str) cnt++;
  }
  return cnt;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long l, r, m;
    cin >> l >> r >> m;
    long long a, b, c;
    for (int i = l; i <= r; i++) {
      a = i;
      if (m < i) {
        long long d = m - a;
        if (d >= l - r && d <= r - l) {
          if (d > 0) {
            b = r;
          } else {
            b = l;
          }
          c = b - d;
          cout << a << ' ' << b << ' ' << c << endl;
          break;
        }
      } else {
        long long n, d;
        n = m / a;
        d = m - n * a;
        if (d >= l - r && d <= r - l) {
          if (d > 0) {
            b = r;
          } else {
            b = l;
          }
          c = b - d;
          cout << a << ' ' << b << ' ' << c << endl;
          break;
        }
        n++;
        d = m - n * a;
        if (d >= l - r && d <= r - l) {
          if (d > 0) {
            b = r;
          } else {
            b = l;
          }
          c = b - d;
          cout << a << ' ' << b << ' ' << c << endl;
          break;
        }
      }
    }
  }
}
