#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const int mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c;
    cin >> a >> b >> c;
    long long ans = 0x3f3f3f3f, ansa, ansb, ansc;
    for (int i = 1; i <= 2 * a; i++) {
      for (int j = i; j <= 2 * b; j += i) {
        for (int k = 0; k <= 1; k++) {
          int mul = j * (c / j) + k * j;
          if (ans > abs(i - a) + abs(j - b) + abs(mul - c)) {
            ans = abs(i - a) + abs(j - b) + abs(mul - c);
            ansa = i;
            ansb = j;
            ansc = mul;
          }
        }
      }
    }
    cout << ans << ' ' << ansa << ' ' << ansb << ' ' << ansc << ' ' << '\n';
  }
  return 0;
}
