#include <bits/stdc++.h>
inline long long read() {
  long long sign = 1;
  long long x = 0;
  char ch;
  while (!isdigit(ch = getchar()))
    if (ch == '-') sign = -1;
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * sign;
}
inline void wonl() { putchar('\n'); }
inline void ww(long long k) {
  if (k < 0) putchar('-'), k *= -1;
  char ch[20];
  int num = 0;
  while (k) ch[++num] = k % 10, k /= 10;
  if (num == 0) ch[++num] = 0;
  while (num) putchar(ch[num--] + '0');
}
using namespace std;
const int N = 1e5 + 4;
template <typename T, typename... V>
inline void wonl(T t, V... v) {
  ww(t);
  if (sizeof...(v)) putchar(' ');
  wonl(v...);
}
void solve() {
  long long l = read(), r = read(), m = read(), diff = r - l;
  if (l > m) {
    diff = l - m;
    wonl(l, l, l + diff);
    return;
  }
  for (long long i = l; i <= r; i++) {
    if (m % i <= diff) {
      wonl(i, l + m % i, l);
      return;
    }
    if (i - m % i <= diff) {
      wonl(i, l, l + i - m % i);
      return;
    }
  }
  wonl();
}
int main() {
  int t = read();
  while (t--) {
    solve();
  }
  return 0;
}
