#include <bits/stdc++.h>
int main() {
  int t;
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    int l, r;
    int64_t m;
    scanf("%d %d %lld", &l, &r, &m);
    for (int a = l; a <= r; a++) {
      int x = m % a;
      if (x <= r - l && (m - x) > 0) {
        printf("%d %d %d\n", a, l + x, l);
        break;
      } else if (r - l >= a - x && (m + a - x) > 0) {
        x = a - x;
        printf("%d %d %d\n", a, l, l + x);
        break;
      }
    }
  }
  return 0;
}
