#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    int r = int(1e9 + 9), r1, r2, r3;
    for (int i = 1; i <= 10000; i++)
      for (int j = 1; j <= 10000 / i + 1; j++)
        for (int k = 1; k <= 10000 / i / j + 2; k++)
          if (r > abs(i - a) + abs(i * j - b) + abs(i * j * k - c)) {
            r = abs(i - a) + abs(i * j - b) + abs(i * j * k - c);
            r1 = i;
            r2 = i * j;
            r3 = i * j * k;
          }
    cout << r << endl << r1 << ' ' << r2 << ' ' << r3 << endl;
  }
  return 0;
}
