#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, i, x, j, k, p, q, sum, m, cnt, ans, l, r, s, a, b, c;
  cin >> t;
  while (t--) {
    sum = 0;
    cnt = 0;
    ans = 1;
    cin >> l >> r >> m;
    for (i = l; i <= r; i++) {
      if (i == m) {
        a = i;
        b = i;
        c = i;
        break;
      } else if (m < i) {
        if (r - l >= i - m) {
          a = i;
          c = r;
          b = r - (i - m);
          break;
        }
      } else {
        p = m % i;
        q = i - p;
        if (r - l >= p) {
          a = i;
          c = l;
          b = l + p;
          break;
        } else if (r - l >= q) {
          a = i;
          b = l;
          c = l + q;
          break;
        }
      }
    }
    cout << a << " " << b << " " << c << endl;
  }
}
