#include <bits/stdc++.h>
using namespace std;
double _eps = 1e-6;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int T;
  cin >> T;
  for (int caseno = 1; caseno <= T; caseno++) {
    long long a, b, c;
    cin >> a >> b >> c;
    long long ans = INT_MAX;
    long long aa, ab, ac;
    for (int i = 1; i <= 2 * 10000; ++i) {
      long long tm = 0;
      long long ta = i;
      for (int j = 1; j * ta <= 2 * 10000; ++j) {
        tm = abs(ta - a);
        long long tb = j * ta;
        long long tmp = c / tb;
        long long tc;
        if (abs(tmp * tb - c) < abs((tmp + 1) * tb - c))
          tc = tmp * tb;
        else
          tc = (tmp + 1) * tb;
        tm += abs(tb - b) + abs(tc - c);
        if (tm < ans) {
          ans = tm;
          aa = ta;
          ab = tb;
          ac = tc;
        }
      }
    }
    cout << ans;
    puts("");
    cout << aa << " " << ab << " " << ac;
    puts("");
  }
  return 0;
}
