#include <bits/stdc++.h>
using namespace std;
long long mod_add(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a + b) % m) + m) % m;
}
long long mod_mul(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a * b) % m) + m) % m;
}
long long mod_sub(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a - b) % m) + m) % m;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long l, r, m;
    cin >> l >> r >> m;
    for (int a = l; a <= r; a++) {
      long long sub = m % a;
      if (sub == 0) {
        cout << a << " " << a << " " << a << endl;
        break;
      } else {
        if ((a + sub) <= r and sub != m) {
          cout << a << " " << (a + sub) << " " << a << endl;
          break;
        } else if ((a - sub) >= l and sub != m) {
          cout << a << " " << a << " " << (a - sub) << endl;
          break;
        } else {
          long long add = a - sub;
          if ((a + add) <= r) {
            cout << a << " " << a << " " << (a + add) << endl;
            break;
          } else if ((a - add) >= l) {
            cout << a << " " << (a - add) << " " << a << endl;
            break;
          }
        }
      }
    }
  }
  return 0;
}
