#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
long long add(long long x, long long y) {
  long long res = x + y;
  return (res >= 1000000007 ? res - 1000000007 : res);
}
long long mul(long long x, long long y) {
  long long res = x * y;
  return (res >= 1000000007 ? res % 1000000007 : res);
}
long long sub(long long x, long long y) {
  long long res = x - y;
  return (res < 0 ? res + 1000000007 : res);
}
long long power(long long x, long long y) {
  long long res = 1;
  x %= 1000000007;
  while (y) {
    if (y & 1) res = mul(res, x);
    y >>= 1;
    x = mul(x, x);
  }
  return res;
}
long long mod_inv(long long x) { return power(x, 1000000007 - 2); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long ttt;
  cin >> ttt;
  while (ttt--) {
    long long a, b, c;
    cin >> a >> b >> c;
    long long ans = inf, ba = -1, bb = -1, bc = -1;
    for (long long i = 1; i < 20002; i++) {
      for (long long j = i; j < 20002; j += i) {
        long long x = abs(a - i) + abs(b - j);
        if (ans > x) {
          long long y = ((c + (j / 2)) / j) * j;
          x += abs(y - c);
          if (ans > x) {
            ans = x;
            ba = i, bb = j, bc = y;
          }
        }
      }
    }
    cout << ans << endl;
    cout << ba << " " << bb << " " << bc << endl;
  }
}
