#include <bits/stdc++.h>
#define MODE 1
#if MODE
#define debug(x) cout << #x << ": " << x << endl
#define log(x) cout << x << endl
#define test(x) x
#else
#define debug(x)
#define log(x)
#define test(x)
#endif
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fi first
#define se second
#define X real()
#define Y imag()
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using P = complex<ll>;
const ll M = 1000000007; // 998244353
double diff[24];
int cnt[24];
double avgdiff;
int avgcnt;
const double pi = 3.14159265358979;
const int que = 4;
const int avg = 7;
void day() {
int n = 36;
vector<double> v(n);
for (auto &i : v) cin >> i;
for (int i = 1; i < n; ++i) {
diff[(i-1) % 24] += v[i] - v[i-1];
++cnt[(i-1) % 24];
}
avgdiff += *max_element(v.begin(), v.begin()+12) - *min_element(v.begin(), v.begin()+12);
avgdiff += *max_element(v.begin()+24, v.begin()+36) - *min_element(v.begin()+24, v.begin()+36);
avgcnt += 2;
}
void precalc() {
for (int i = 0; i < 24; ++i) diff[i] /= cnt[i];
avgdiff /= avgcnt;
for (int i = 0; i < 24; ++i) cout << "diff[" << i << "] = " << diff[i] << ";\n";
cout << "avgdiff = " << avgdiff << ";\n";
}
void init() {
for (int i = 0; i < 24; ++i) diff[i] = -sin(i * pi / 12.0);
double cur = 0, minv = 0, maxv = 0;
for (int i = 24-avg; i < 24; ++i) {
cur += diff[i];
minv = min(minv, cur);
maxv = max(maxv, cur);
}
avgdiff = maxv - minv;
}
void solve() {
vector<double> v(24);
for (auto &i : v) cin >> i;
double mul = (*max_element(v.end()-avg, v.end()) - *min_element(v.end()-avg, v.end())) / avgdiff;
for (int i = 24; i < 36-que; ++i) {
double nx = v[i-1] + mul * diff[(i-1) % 24];
cout << nx << ' ';
v.push_back(nx);
}
for (int i = 36-que; i < 36; ++i) cout << "? ";
cout << '\n';
}
int main() {
cin.tie(0) -> sync_with_stdio(0);
cout << fixed << setprecision(6);
#if 0
int t = 0;
if (t == 0) cin >> t;
while (t--) day();
precalc();
#else
init();
int t = 0;
if (t == 0) cin >> t;
while (t--) solve();
#endif
return 0;
}