#include<iostream>
using namespace std;
int main(){
int n, a, b, c, d;
cin >> n;
while ( n -- ) {
a = 0;
b = 0;
c = 0;
d = 0;
cin >> a >> b >> c >> d;
if(( b - a ) == ( c - b ))
cout << a << " " << b << " " << c << " " << d << " " << d + b - a;
else
cout << a << " " << b << " " << c << " " << d << " " << d * ( b / a );
cout << "\n" ;
}
}
謝謝大家!!!