#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  int tt = 1;
  cin >> tt;
  while (tt--) {
    int a, b, c;
    cin >> a >> b >> c;
    int ans = INT_MAX;
    int A = 1e9, B = 1e9, C = 1e9;
    for (int i = 1; i <= 2 * a; i++) {
      for (int j = i; j <= 2 * b; j += i) {
        if (j % i) continue;
        int y = c / j;
        int x1 = y * j;
        int x2 = (y + 1) * j;
        if (abs(i - a) + abs(j - b) + abs(x1 - c) < ans) {
          ans = abs(i - a) + abs(j - b) + abs(x1 - c);
          A = i;
          B = j;
          C = x1;
        }
        if (abs(i - a) + abs(j - b) + abs(x2 - c) < ans) {
          ans = abs(i - a) + abs(j - b) + abs(x2 - c);
          A = i;
          B = j;
          C = x2;
        }
      }
    }
    cout << ans << endl;
    cout << A << " " << B << " " << C << endl;
  }
}
