#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    int ans = 1 << 30;
    int pa, pb, pc;
    for (int A = 1; A <= 2e4; A++)
      for (int B = A; B <= 2e4; B += A)
        for (int C = B; C <= 2e4; C += B) {
          int now = abs(A - a) + abs(B - b) + abs(C - c);
          if (now < ans) pa = A, pb = B, pc = C, ans = now;
        }
    printf("%d\n%d %d %d\n", ans, pa, pb, pc);
  }
  return 0;
}
