#include <bits/stdc++.h>
long long l, r, m, a, b, c, k, n;
int main() {
  std::ios::sync_with_stdio(false);
  int t;
  std::cin >> t;
  while (t-- > 0) {
    std::cin >> l >> r >> m;
    for (a = l; a <= r; ++a) {
      n = m / a;
      k = m - a * n;
      if (n > 0 && k <= r - l) {
        std::cout << a << " " << r << " " << r - k << std::endl;
        break;
      }
      n = m / a + 1;
      k = n * a - m;
      if (n > 0 && k <= r - l) {
        std::cout << a << " " << r - k << " " << r << std::endl;
        break;
      }
    }
  }
  return 0;
}
