#include <bits/stdc++.h>
char _;
using namespace std;
void PRINT(int x, int y) {
  for (int i = y - 1; i >= 0; i--) {
    cout << ((0u == (x & (1 << i))) ? 0u : 1u);
  }
  cout << endl;
}
vector<string> vec_splitter(string s) {
  s += ',';
  vector<string> res;
  while (!s.empty()) {
    res.push_back(s.substr(0, s.find(',')));
    s = s.substr(s.find(',') + 1);
  }
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << ") ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int a, b, c, ans = numeric_limits<int>::max(), n1 = -1, n2 = -1, n3 = -1;
    cin >> a >> b >> c;
    for (int x = 1; x <= 20000; x++) {
      for (int i = 1; i <= 20000 / x + 5; i++) {
        int cst = abs(a - x) + abs(i * x - b);
        if (i * x > c) {
          cst += abs(i * x - c);
          ans = min(ans, cst);
          if (ans == cst) {
            if (cst == 90) {
              42;
            }
            n1 = x;
            n2 = i * x;
            n3 = i * x;
          }
        } else {
          int f = c / (i * x), s = f + 1;
          for (int j = max(f - 2, 1); j <= f + 2; j++) {
            if (ans > cst + abs(c - j * (x * i))) {
              ans = cst + abs(c - j * (x * i));
              n1 = x;
              n2 = i * x;
              n3 = j * i * x;
            }
          }
        }
      }
    }
    cout << ans << "\n";
    cout << n1 << " " << n2 << " " << n3 << "\n";
  }
  return 0;
}
