#include <bits/stdc++.h>
using namespace std;
long long int min(long long int a, long long int b) { return a < b ? a : b; }
long long int min(long long int a, long long int b, long long int c) {
  a = min(a, b);
  a = min(a, c);
  return a;
}
long long int max(long long int a, long long int b) { return a > b ? a : b; }
long long int max(long long int a, long long int b, long long int c) {
  a = max(a, b);
  a = max(a, c);
  return a;
}
long long int power(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long int mpower(long long int a, long long int b, long long int m) {
  long long int res = 1;
  a = a % m;
  while (b) {
    if (b & 1) {
      res = (res * a) % m;
    }
    a = ((a % m) * (a % m)) % m;
    b >>= 1;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  if (a == 0) return b;
  if (a >= b)
    return gcd(b, a % b);
  else
    return gcd(a, b % a);
}
long long int lcm(long long int a, long long int b) {
  long long int p = a * b;
  return p / gcd(a, b);
}
long long int dsum(long long int n) {
  long long int ans = 0;
  while (n) {
    ans += (n % 10);
    n /= 10;
  }
  return ans;
}
long long int ndigit(long long int n) {
  long long int count = 0;
  if (n == 0) return 1;
  while (n) {
    count++;
    n /= 10;
  }
  return count;
}
int solve() {
  char ch1, ch2, ch3;
  string s1, s2, s3, str;
  long long int i, j, k, a, b, c, t, d, m, sum = 0, ans = 0, n, temp;
  cin >> a >> b >> c;
  long long int x, y, z;
  ans = 1000000007;
  for (i = 1; i <= 2 * a; i++) {
    for (j = i; j <= 2 * b; j += i) {
      for (k = 0; k < 2; k++) {
        t = (c / j) * j + k * j;
        sum = abs(a - i) + abs(b - j) + abs(c - t);
        if (sum < ans) {
          ans = sum;
          x = i;
          y = j;
          z = t;
        }
      }
    }
  }
  cout << ans << endl;
  cout << x << " " << y << " " << z << endl;
  return 0;
}
int main() {
  long long int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
