/*
C++ code author: Vludo
Created: 2023-11-11 23:04:37
*/
#include <bits/stdc++.h>
#define forn(i, n) for(int i=0; i<n; i++)
#define FOR(i, j, n) for(int i=j; i<n; i++)
#define pb push_back
#define F first
#define S second
#define sz(a) ((int)(a).size())
#define all(a) (a).begin(),a.end()
#define ever ;;
typedef long long ll;
typedef double dbl;
const int inf = 1.01e9;
const int mod = 1e9 + 7;
using namespace std;
// ---- main part ---- //
static inline unsigned long long rdtsc() { unsigned long long d; asm volatile ("rdtsc" : "=A" (d) ); return d; }
// Python apuun:
dbl statistiikka[12][15] = {
{0.0, -0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0},
{-0.8, -0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.0},
{-1.0, 0.3, 0.5, 0.0, 0.0, 0.0, -0.1, 0.0, -0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
{-0.3, -1.8, 0.0, 0.0, 0.0, 0.0, -0.3, 0.0, 0.0, -0.2, 0.0, 0.0, 0.0, 0.0, 0.0},
{-1.3, -2.3, -2.8, 0.0, 0.0, -0.7, -0.2, 0.0, -0.1, -0.7, 0.0, 0.0, -0.5, -1.0, -0.6},
{-1.5, 0.1, -1.0, 1.0, 0.0, -0.5, -0.2, 0.0, -0.7, -0.7, 0.0, 0.0, -1.8, -1.3, -1.6},
{-1.1, -3.8, -1.5, 0.5, 0.0, -0.2, 0.0, 0.0, -0.9, 0.0, 0.0, 0.0, -2.5, -2.5, -4.6},
{-1.9, -5.0, -4.3, 0.5, 0.0, 0.0, 0.0, 0.0, -1.5, -0.5, -0.5, -1.0, -3.6, -3.8, -7.5},
{-1.3, -4.1, -2.3, -2.5, -1.2, -1.0, -1.1, 0.0, -1.5, -0.7, 0.0, -1.0, -2.0, -4.6, -9.3},
{2.6, -4.0, 3.0, 0.5, 0.0, -1.2, -2.0, 0.0, 0.0, 0.0, 0.0, -1.5, -4.1, -7.7, -10.8},
{-1.3, -5.5, -1.6, -1.5, 0.5, -2.0, -1.6, 0.0, 0.0, 0.0, 0.0, 0.0, -3.0, -3.8, -10.7},
{-3.3, -1.5, -2.5, -1.0, 0.0, 0.0, -0.7, 0.0, -2.0, -0.2, 0.0, 0.0, -4.0, -6.0, -14.2}};
dbl diaps[15][2] = {
{-35, -25},
{-25, -20},
{-20, -15},
{-15, -10},
{-10, -5},
{-5, -3},
{-3, -1.8},
{-1.8, 1.8},
{1.8, 3},
{3, 5},
{5, 10},
{10, 15},
{15, 20},
{20, 25},
{25, 35}
};
int main () {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
srand(rdtsc());
int n;
cin >> n;
forn(i, n) {
float arr[36];
forn(j, 24) {
cin >> arr[j];
}
int diap;
forn(j, 15) {
if (arr[23] > diaps[j][0] && arr[23] <= diaps[j][1]) {
diap = j;
break;
}
}
forn(j, 6) {
int day = j;
cout << arr[23] + statistiikka[day][diap] << " ";
}
forn(gg, 6) cout << "? ";
cout << endl;
}
return 0;
}