#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
const long long int N = 200005;
const long long int inf = 1e18;
vector<long long int> vis(N);
vector<vector<long long int>> adj(N);
bool isPrime(long long n) {
  if (n < 2) return false;
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
long long power(long long x, long long y) {
  long long res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res % mod;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a / gcd(a, b) * b); }
long long max(long long a, long long b) {
  long long ans = a > b ? a : b;
  return ans;
}
long long min(long long a, long long b) {
  long long ans = a < b ? a : b;
  return ans;
}
void fun() {}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  fun();
  long long int tt = 1;
  cin >> tt;
  while (tt--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    long long int ans = 1e9;
    long long int A = -1, B = -1, C = -1;
    for (long long int i = 1; i <= 2 * a; i++) {
      for (long long int j = i; j <= 2 * b; j += i) {
        for (long long int l = 0; l < 2; l++) {
          long long int k = j * (c / j) + l * j;
          long long int res = abs(i - a) + abs(j - b) + abs(k - c);
          if (res < ans) {
            ans = res;
            A = i;
            B = j;
            C = k;
          }
        }
      }
    }
    cout << ans << "\n";
    cout << A << " " << B << " " << C << "\n";
  }
  return 0;
}
