#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
const int fx[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
const int fxx[8][2] = {{0, 1}, {0, -1}, {1, 0},  {-1, 0},
                       {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
template <typename T, typename TT>
ostream& operator<<(ostream& s, pair<T, TT> t) {
  return s << "(" << t.first << "," << t.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, vector<T> t) {
  for (int i = 0; i < ((int)((t).size())); i++) s << t[i] << " ";
  return s;
}
int main() {
  int tc;
  scanf("%d", &tc);
  for (int t = 1; t <= tc; t++) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    int mini = INT_MAX;
    int A, B, C;
    for (int i = 1; i <= 2 * a; i++) {
      int mult = 1;
      while (i * mult <= 2 * b) {
        int j = i * mult;
        int div = c / j;
        int temp1 = j * div;
        int temp2 = j * (div + 1);
        int sub1 = temp1 - c;
        int absSub1 = (sub1 < 0 ? (-sub1) : sub1);
        int sub2 = temp2 - c;
        int absSub2 = (sub2 < 0 ? (-sub2) : sub2);
        int sub3 = j - b;
        int absSub3 = (sub3 < 0 ? (-sub3) : sub3);
        int sub4 = i - a;
        int absSub4 = (sub4 < 0 ? (-sub4) : sub4);
        if (absSub1 + absSub3 + absSub4 < mini) {
          mini = absSub1 + absSub3 + absSub4;
          A = i;
          B = j;
          C = temp1;
        }
        if (absSub2 + absSub3 + absSub4 < mini) {
          mini = absSub2 + absSub3 + absSub4;
          A = i;
          B = j;
          C = temp2;
        }
        mult++;
      }
    }
    cout << mini << endl;
    cout << A << " " << B << " " << C << endl;
  }
}
