#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, c;
    cin >> a >> b >> c;
    int i, j, k, l;
    int dis = 1e9 + 7;
    int ma, mb, mc;
    for (i = 1; i <= 2 * a; i++) {
      for (j = i; j <= 2 * b; j += i) {
        for (k = 0; k < 2; k++) {
          l = j * (c / j) + k * j;
          if (abs(a - i) + abs(b - j) + abs(c - l) <= dis) {
            dis = abs(a - i) + abs(b - j) + abs(c - l);
            ma = i;
            mb = j;
            mc = l;
          }
        }
      }
    }
    cout << dis << endl;
    cout << ma << " " << mb << " " << mc << endl;
  }
  return 0;
}
