#include <bits/stdc++.h>
using namespace std;
void runcase() {
  int a, b, c;
  cin >> a >> b >> c;
  int besta = a, bestb = b, bestc = c;
  int cost = 20005 << 2;
  for (int i = 1; i <= (a << 1); i++) {
    for (int j = 1; j < 20005; j++) {
      if (j * i > (b << 1)) break;
      int A = i;
      int B = j * A;
      int C = (c + B / 2) / B * B;
      int ncost = abs(A - a) + abs(B - b) + abs(C - c);
      if (ncost < cost) {
        cost = ncost;
        besta = A;
        bestb = B;
        bestc = C;
      }
    }
  }
  cout << cost << endl;
  cout << besta << " " << bestb << " " << bestc << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  while (T--) {
    runcase();
  }
  return 0;
}
