#include <bits/stdc++.h>
using namespace std;
int t, a, b, c;
void input();
void solve();
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  input();
  return 0;
}
void input() {
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    solve();
  }
}
void solve() {
  pair<int, pair<int, int>> ans;
  int mx = INT_MAX;
  for (int i = 1; i <= 20000; i++)
    for (int j = i; j <= 20000; j += i)
      for (int k = j; k <= 20000; k += j)
        if (abs(a - i) + abs(b - j) + abs(c - k) < mx) {
          mx = abs(a - i) + abs(b - j) + abs(c - k);
          ans = {i, {j, k}};
        }
  cout << mx << endl;
  cout << ans.first << " " << ans.second.first << " " << ans.second.second
       << endl;
}
