#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    int ans = INT_MAX;
    int ansa, ansb, ansc;
    for (int x = 1; x <= 2 * a; x++) {
      for (int y = x; y <= 2 * b; y += x) {
        int z1 = c / y * y;
        int z2 = (int)ceil((double)c / y) * y;
        int tmp = abs(x - a) + abs(y - b) + min(abs(z1 - c), abs(z2 - c));
        ans = min(ans, tmp);
        if (ans == tmp) {
          ansa = x;
          ansb = y;
          if (min(abs(z1 - c), abs(z2 - c)) == abs(z1 - c)) {
            ansc = z1;
          } else
            ansc = z2;
        }
      }
    }
    cout << ans << '\n';
    cout << ansa << ' ' << ansb << ' ' << ansc << '\n';
  }
}
