#include <bits/stdc++.h>
using namespace std;
int t;
int a, b, c;
int A, B, C;
int solve() {
  int result = -1;
  for (int i = 1; i <= 10000; ++i) {
    int costOne = abs(i - a);
    for (int j = 1;; ++j) {
      int costTwo = abs(j * i - b);
      for (int k = 1;; ++k) {
        int costThree = abs(j * i * k - c);
        if (result == -1) {
          result = costOne + costTwo + costThree;
          A = i;
          B = j * i;
          C = j * i * k;
        } else {
          if (costOne + costTwo + costThree < result) {
            result = costOne + costTwo + costThree;
            A = i;
            B = j * i;
            C = j * i * k;
          }
        }
        if (j * i * k > c) break;
      }
      if (j * i > c) break;
    }
  }
  return result;
}
int main() {
  cin >> t;
  for (int i = 0; i < t; ++i) {
    cin >> a >> b >> c;
    cout << solve() << endl;
    cout << A << ' ' << B << ' ' << C << endl;
  }
  return 0;
}
