#include <bits/stdc++.h>
using namespace std;
const int M = 100001;
char c[M];
int T;
int main() {
  scanf("%d", &T);
  for (; T; T--) {
    long long m;
    int b, c, l, r, B = 0;
    scanf("%d%d%lld", &l, &r, &m);
    for (int a = l; a <= r; a++) {
      long long n = max(m / a, 1ll);
      long long t = m - n * a;
      if (max(t, -t) <= r - l) {
        if (t > 0)
          b = l + t, c = l;
        else
          b = l, c = l - t;
        printf("%d %d %d\n", a, b, c);
        B = 1;
        break;
      }
      n += 1;
      t = m - n * a;
      if (max(t, -t) <= r - l) {
        if (t > 0)
          b = l + t, c = l;
        else
          b = l, c = l - t;
        printf("%d %d %d\n", a, b, c);
        B = 1;
        break;
      }
    }
  }
}
