#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
ifstream in("input.txt");
ofstream out("output.txt");
struct point {
  ld x, y;
  point(ld a, ld b) {
    x = a;
    y = b;
  }
};
ld scal(point a, point b) { return (a.x * b.x) + (b.y * a.y); }
ld vec(point a, point b) { return (a.x * b.y) - (b.x * a.y); }
ld len(point a) { return sqrt(a.x * a.x + a.y * a.y); }
ll powMod(ll x, ll y, ll mod) {
  if (!y) return 1;
  ll z = powMod((x) % mod, (y / 2) % mod, mod);
  if (y % 2)
    return ((x) % mod * (z) % mod * (z) % mod) % mod;
  else
    return ((z) % mod * (z) % mod) % mod;
}
vector<ll> gcdPlus(ll a, ll b) {
  if (!a) return vector<ll>{b, 0, 1};
  vector<ll> tres(3);
  tres = gcdPlus(b % a, a);
  ll x = tres[2] - (b / a) * tres[1];
  ll y = tres[1];
  return vector<ll>{tres[0], x, y};
}
ll gcd(ll a, ll b) {
  while (a > 0 && b > 0) {
    if (a > b)
      a %= b;
    else
      b %= a;
  }
  return a + b;
}
struct node {
  ll x, y, z;
};
string downcase(string s) {
  for (ll i = 0; i < s.size(); i++) {
    if (s[i] >= 'A' && s[i] <= 'Z') {
      s[i] += 32;
    }
  }
  return s;
}
ll sum(ll n) {
  ll ans = 0;
  while (n > 0) {
    ans += n % 10;
    n /= 10;
  }
  return ans;
}
const ll arrS = 1e5 + 5, mod = 1e9 + 7;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int q;
  cin >> q;
  while (q--) {
    ll l, r, m;
    cin >> l >> r >> m;
    for (ll i = l; i <= r; i++) {
      if (i > m) {
        if (i - m <= r - l) {
          cout << i << ' ' << l << ' ' << l + i - m;
          break;
        }
      } else {
        if (m % i <= r - l) {
          cout << i << ' ' << l + m % i << ' ' << l;
          break;
        }
        if (i - (m % i) <= r - l) {
          cout << i << ' ' << l << ' ' << l + i - (m % i);
          break;
        }
      }
    }
    cout << '\n';
  }
  return 0;
}
