#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    long long l, r, m, a = 0, b, c, n;
    cin >> l >> r >> m;
    long long na_left = m - r + l, na_right = m + r - l;
    long long n_left = ceil(na_left / (double)r),
              n_right = floor(na_right / (double)l);
    if (n_left < 1) n_left = 1;
    for (long long i = n_left; i <= n_right; i++) {
      for (long long af = l; af <= r; af++)
        if (m - i * af >= l - r && m - i * af <= r - l) {
          n = i;
          a = af;
          break;
        }
      if (a) break;
    }
    if (m - n * a >= 0) {
      b = r;
      c = r - m + n * a;
    } else {
      c = r;
      b = r + m - n * a;
    }
    cout << a << " " << b << " " << c << "\n";
  }
}
