#include <bits/stdc++.h>
using namespace ::std;
int t, l, r, n;
long long m;
signed main() {
  scanf("%d", &t);
  while (t--) {
    int a = 0, flag = 0, i;
    scanf("%d%d%lld", &l, &r, &m);
    for (i = l; i <= r; i++) {
      if ((m % i <= r - l && m / i >= 1)) {
        flag = 1;
        break;
      } else if ((m % i - i >= l - r)) {
        flag = 2;
        break;
      }
    }
    if (flag == 1)
      printf("%d %d %d\n", i, r, r - m % i);
    else
      printf("%d %d %d\n", i, l, l - (m % i - i));
  }
  return 0;
}
