#include <bits/stdc++.h>
using namespace std;
long long fast_pow(long long x, long long y, long long p);
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  long long ans = INT_MAX;
  long long ansA = -1, ansB = -1, ansC = -1;
  for (long long ta = 1; ta <= 2 * a; ta++) {
    for (long long tb = ta; tb <= 2 * b; tb += ta) {
      long long sum = abs(a - ta) + abs(b - tb);
      if ((c % tb) < (tb - (c % tb))) {
        sum += (c % tb);
        if (sum < ans) {
          ans = sum;
          ansA = ta;
          ansB = tb;
          long long temp = c / tb;
          ansC = temp * tb;
        }
      } else {
        sum += (tb - (c % tb));
        if (sum < ans) {
          ans = sum;
          ansA = ta;
          ansB = tb;
          long long temp = (c / tb) + 1;
          ansC = temp * tb;
        }
      }
    }
  }
  cout << ans << "\n";
  cout << ansA << " " << ansB << " " << ansC << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long test = 1;
  cin >> test;
  while (test--) {
    solve();
  }
  return 0;
}
long long fast_pow(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
