#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    int ans = a + b + c;
    int A = a, B = b, C = c;
    for (int i = 1; i <= 10000; i++) {
      int tmp1 = abs(i - a);
      for (int j = i; j <= 15000; j += i) {
        int tmp2 = abs(j - b);
        for (int k = j; k <= 15000; k += j) {
          int tmp3 = abs(k - c);
          int temp = tmp1 + tmp2 + tmp3;
          if (temp < ans) {
            ans = temp;
            A = i, B = j, C = k;
          }
        }
      }
    }
    cout << ans << endl;
    cout << A << " " << B << " " << C << endl;
  }
}
