#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int u = 0; u < t; u++) {
    int a, b, c;
    cin >> a >> b >> c;
    int min1 = 10000000;
    vector<int> ans(3);
    for (int x = 1; x <= 2 * a; x++) {
      int k = 1;
      while (k * x <= 2 * b) {
        int y = k * x;
        int j = c / y;
        int z1 = j * y;
        int z2 = (j + 1) * y;
        if (z1 >= y && abs(c - z1) + abs(y - b) + abs(x - a) < min1) {
          min1 = abs(c - z1) + abs(y - b) + abs(x - a);
          ans[0] = x;
          ans[1] = y;
          ans[2] = z1;
        }
        if (z2 >= y && abs(c - z2) + abs(y - b) + abs(x - a) < min1) {
          min1 = abs(c - z2) + abs(y - b) + abs(x - a);
          ans[0] = x;
          ans[1] = y;
          ans[2] = z2;
        }
        k++;
      }
    }
    cout << min1 << endl;
    cout << ans[0] << ' ' << ans[1] << ' ' << ans[2] << endl;
  }
}
