#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  for (int t = 1; t <= q; t++) {
    long long l, r, m;
    cin >> l >> r >> m;
    long long a, b, c;
    for (long long i = l; i <= r; i++) {
      if (i > m && i - m <= r - l) {
        a = i;
        b = l;
        c = l + i - m;
        break;
      } else if (i <= m && min(m % i, i - m % i) <= r - l) {
        if (m % i == min(m % i, i - m % i)) {
          a = i;
          b = l + m % i;
          c = l;
        } else {
          a = i;
          b = l;
          c = l + i - m % i;
        }
        break;
      }
    }
    cout << a << " " << b << " " << c << "\n";
  }
}
