#include <bits/stdc++.h>
long long l, r, m, t;
int main() {
  scanf("%lld", &t);
  while (t--) {
    scanf("%lld %lld %lld", &l, &r, &m);
    long long a, b, c;
    for (a = l; a <= r; a++) {
      long long bc = m % a;
      if (m < a) {
        if (a - bc <= r - l) {
          b = l;
          c = l + a - bc;
          break;
        }
      } else {
        if (a - bc <= r - l) {
          b = l;
          c = l + a - bc;
          break;
        }
        if (bc <= r - l) {
          b = r;
          c = r - bc;
          break;
        }
      }
    }
    printf("%lld %lld %lld\n", a, b, c);
  }
}
