#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, a, b, c, t, s;
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> a >> b >> c;
    t = c;
    s = a + b + c;
    c = max(max(a, b), c);
    a = min(min(a, b), t);
    b = s - a - c;
    cout << a << " " << b << " " << c << endl;
    s = 0;
    while (c > 2 && b > 1) {
      c -= 2;
      b -= 1;
      s += 3;
    }
    while (a > 2 && b > 1) {
      a -= 2;
      b -= 1;
      s += 3;
    }
    while (a > 2 && c > 1) {
      a -= 2;
      c -= 1;
      s += 3;
    }
    cout << s << endl;
  }
  return 0;
}
