#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    long long ans = INT_MAX;
    long long an = a, bn = b, cn = c;
    for (int i = 1; i <= 11000; i++) {
      for (int j = i; j <= 11000; j += i) {
        for (int k = j; k <= 11000; k += j) {
          long long d = abs(a - i) + abs(b - j) + abs(c - k);
          if (d < ans) {
            ans = d;
            an = i;
            bn = j;
            cn = k;
          }
        }
      }
    }
    cout << ans << endl;
    cout << an << " " << bn << " " << cn << endl;
  }
  return 0;
}
