#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const double eps = 1e-10;
const long long M = 1e9 + 7;
const long long N = 1e5 + 5;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c, s[5];
    cin >> a >> b >> c;
    long long minx = INF;
    for (long long i = 1; i <= 11000; i++) {
      for (long long j = i; j <= 11000; j += i) {
        for (long long k = j; k <= 11000; k += j) {
          long long tmp = abs(a - i) + abs(b - j) + abs(c - k);
          if (tmp < minx) {
            minx = tmp;
            s[1] = i;
            s[2] = j;
            s[3] = k;
          }
        }
      }
    }
    cout << minx << endl;
    cout << s[1] << " " << s[2] << " " << s[3] << endl;
  }
  return 0;
}
