#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int a, b, c, ans = 0x3f3f3f3f;
    cin >> a >> b >> c;
    int A, B, C, a1 = -1, b1 = -1, c1 = -1;
    for (A = 1; A < 2 * a; A++) {
      for (B = A; B < 2 * b; B += A) {
        for (int i = 0; i < 2; i++) {
          C = c / B * B + B * i;
          int res = abs(C - c) + abs(A - a) + abs(B - b);
          if (res < ans) {
            ans = res;
            c1 = C;
            b1 = B;
            a1 = A;
          }
        }
      }
    }
    cout << ans << endl << a1 << " " << b1 << " " << c1 << endl;
  }
}
