#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 0x7fffffff;
int t, a, b, c;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    scanf("%d%d%d", &a, &b, &c);
    int v1 = 0, v2 = 0, v3 = 0, ans = inf;
    for (int i = 1; i <= 11000; i++)
      for (int j = i; j <= 11000; j += i)
        for (int k = j; k <= 11000; k += j)
          if (abs(a - i) + abs(b - j) + abs(c - k) < ans)
            ans = abs(a - i) + abs(b - j) + abs(c - k), v1 = i, v2 = j, v3 = k;
    printf("%d\n%d %d %d\n", ans, v1, v2, v3);
  }
  return 0;
}
