#include <bits/stdc++.h>
using namespace std;
int t, a, b, c;
int main() {
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    int ans = 0x7fffffff;
    int A = -1, B = -1, C = -1;
    for (int aa = 1; aa <= 2 * a; aa++) {
      for (int bb = aa; bb <= 2 * b; bb += aa) {
        for (int i = 0; i <= 1; i++) {
          int cc = bb * (c / bb) + i * bb;
          int res = abs(cc - c) + abs(bb - b) + abs(aa - a);
          if (ans > res) {
            ans = res;
            A = aa;
            B = bb;
            C = cc;
          }
        }
      }
    }
    cout << ans << endl << A << " " << B << " " << C << endl;
  }
  return 0;
}
