#include <bits/stdc++.h>
using namespace std;
int n, m, k, x, t, y, z, w, ans, l;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> t;
  while (t--) {
    cin >> n >> m >> l;
    ans = 3e4;
    for (int i = 1; i <= 3e4; ++i)
      for (int j = 1; j * i <= 3e4; ++j)
        for (int k = 1; k * i * j <= 3e4; ++k) {
          w = abs(n - i) + abs(m - i * j) + abs(l - i * j * k);
          if (w < ans) ans = w, x = i, y = i * j, z = i * j * k;
        }
    cout << ans << endl << x << " " << y << " " << z << endl;
  }
}
