#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int i, k, a, b, c, j, r = 1000000, x, y, z;
    cin >> a >> b >> c;
    for (i = 1; i <= 11000; i++) {
      for (j = i; j <= 11000; j = j + i) {
        for (k = j; k <= 11000; k = k + j) {
          if ((abs(i - a) + abs(j - b) + abs(k - c)) < r) {
            r = (abs(i - a) + abs(j - b) + abs(k - c));
            x = i;
            y = j;
            z = k;
          }
        }
      }
    }
    cout << r << "\n";
    cout << x << " " << y << " " << z << "\n";
  }
}
