#include <bits/stdc++.h>
const long long pinf = ((long long)9e18);
const long long ninf = ((long long)-9e18);
const long long mod = 1000000007;
using namespace std;
int32_t main() {
  ;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long T;
  cin >> T;
  while (T--) {
    long long a, b, c;
    cin >> a >> b >> c;
    long long ans = pinf;
    long long n, m, k;
    for (long long x = 1; x <= 2 * a; x++) {
      for (long long y = x; y <= 2 * b; y += x) {
        long long s = (c / y) * y;
        long long t = (c / y + 1) * y;
        if (abs(c - s) < abs(c - t)) {
          long long g = abs(x - a) + abs(y - b) + abs(c - s);
          if (ans > g) {
            ans = g;
            n = x;
            m = y;
            k = s;
          }
        } else {
          long long g = abs(x - a) + abs(y - b) + abs(c - t);
          if (ans > g) {
            ans = g;
            n = x;
            m = y;
            k = t;
          }
        }
      }
    }
    cout << ans << "\n";
    cout << n << " " << m << " " << k << "\n";
  }
  return 0;
}
