#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    int a, b, c;
    cin >> a >> b >> c;
    int q, w, e;
    int ans = INT_MAX;
    for (int i = 1; i <= 10101; ++i) {
      for (int j = i; j <= 10101; j += i) {
        for (int k = j; k <= 10101; k += j) {
          if (abs(a - i) + abs(b - j) + abs(c - k) < ans) {
            ans = abs(a - i) + abs(b - j) + abs(c - k);
            q = i;
            w = j;
            e = k;
          }
        }
      }
    }
    cout << ans << '\n';
    cout << q << ' ' << w << ' ' << e << '\n';
  }
  return 0;
}
