#include<bits/stdc++.h>
using namespace std;
double b[12]={
-0.1,-0.1,-0.1,-0.1,-0.1,-0.1,0,0.1,0,0.1,0.1,0.1,
};
double bb[12]={
-1,-1,-1,-1,-1,-1,0,1,0,1,1,1,
};
double a[25],diff[25];
int n;
int main(){
cin>>n;
while(n--){
double minerr=9999.9;
for(int i=0;i<24;i++){
cin>>a[i];
}
double avrdf=0;
for(int i=0;i<23;i++){
diff[i]=a[i+1]-a[i];
avrdf+=diff[i];
}
avrdf/=23;
double err=0;
int id;
double df=a[0]-a[23]-b[id][0];
double x=df;
for(int i=0;i<12;i++){
x+=(b[i]*6+diff[i])/7;
if(x-a[i]>2.2){
cout<<"? ";
continue;
}
cout<<x<<" ";
}
cout<<endl;
}
}