#include using namespace std; long long gcd(long long a,long long b) { if(a%b == 0) { return b; } else { return gcd(b,a%b); } } int main() { int T; cin >> T; while (T--) { long long A,B,C; cin >> A >> B >> C; long long D = A*gcd(A,B)*B; long long E = D*gcd(D,C)*C; cout << E << " " << E << " " << E << endl; } }