#include <bits/stdc++.h>
using namespace std;
long long dp[100005][2];
long long factor[100001];
long long fact(long long n);
long long power(long long a, long long b, long long f1) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y);
      if (x > f1) x %= f1;
    }
    y = (y * y);
    if (y > f1) y %= f1;
    b /= 2;
  }
  return x;
}
long long fact(long long n, long long f1) { return power(n, f1 - 2, f1); }
long long nCr(long long n, long long r, long long f1) {
  return (factor[n] * ((fact(factor[r], f1) * fact(factor[n - r], f1)) % f1)) %
         f1;
}
template <typename T>
T ma(T x, T y) {
  return (x > y) ? x : y;
}
bool subset(vector<long long> &v, long long n, long long sum) {
  if (sum == 0) return true;
  if (n == 0) return false;
  if (v[n - 1] > sum) {
    return subset(v, n - 1, sum);
  }
  return subset(v, n - 1, sum) || subset(v, n - 1, sum - v[n - 1]);
}
long long ans1 = 0;
long long ans2 = 0;
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.second < b.second);
}
long long prime[1000001];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long t, i, j, n, m;
  long long ans = 0;
  for (i = 1; i <= 1000001; i++) prime[i] = 1;
  prime[1] = 0;
  for (i = 2; i * i <= 1000001; i++) {
    if (prime[i] == 1) {
      for (j = i * i; j <= 1000001; j = j + i) {
        prime[j] = 0;
      }
    }
  }
  for (i = 1; i <= 1000001; i++) {
    if (prime[i] == 1) {
      ans++;
    }
  }
  factor[0] = 1;
  for (i = 1; i <= 100001; i++) {
    factor[i] = (factor[i - 1] * i) % 1000000007;
  }
  t = 1;
  cin >> t;
  while (t--) {
    long long a, b, c, ans = INT_MAX;
    cin >> a >> b >> c;
    long long fa1, fa2, fa3;
    for (i = 1; i <= 2 * a; i++) {
      for (j = i; j <= 2 * b; j += i) {
        long long d = (c / j) * j;
        long long f = (c / j) * j + j;
        long long a1 = abs(i - a) + abs(j - b) + abs(d - c);
        if (a1 < ans) {
          ans = a1;
          fa1 = i;
          fa2 = j;
          fa3 = d;
        }
        long long a2 = abs(i - a) + abs(j - b) + abs(f - c);
        if (a2 < ans) {
          ans = a2;
          fa1 = i;
          fa2 = j;
          fa3 = f;
        }
      }
    }
    cout << ans << endl;
    cout << fa1 << " " << fa2 << " " << fa3 << endl;
  }
  return 0;
}
