#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int i;
  for (i = 0; i < t; i++) {
    int mm, n3, y;
    int a, b, c;
    cin >> a >> b >> c;
    int j;
    int d;
    int n1, n2;
    mm = abs(abs(a - b) - c);
    for (j = 1; j < 2 * a; j++) {
      d = abs(a - j);
      int bb;
      for (bb = j; bb < 2 * b; bb) {
        int d1 = abs(b - bb);
        if (abs(c - (c / bb) * bb) < abs(c - ((c / bb) * bb + bb))) {
          y = (c / bb) * bb;
        } else {
          y = (c / bb) * bb + bb;
        }
        d1 =
            d + d1 + min(abs(c - (c / bb) * bb), abs(c - ((c / bb) * bb + bb)));
        if (mm > d1) {
          mm = d1;
          n1 = j;
          n2 = bb;
          n3 = y;
        }
        bb = bb + j;
      }
    }
    cout << mm << "\n"
         << n1 << " " << n2 << " " << n3 << " "
         << "\n";
  }
  return 0;
}
