#include #include using namespace std; int main() { int n; cin >> n; cout << "?" << " " << 1 << " " << 2 << endl; int s; cin >> s; cout << "?" << " " << 2 << " " << 3 << endl; int t; cin >> t; if (n == 3) { int p[3] = {1, 2, 3}; do { if (p[0] + p[1] == s && p[1] + p[2] == t) { cout << "!" << " " << p[0] << " " << p[1] << " " << p[2] << endl; return 0; } } while (next_permutation(p, p + 3)); } cout << "?" << " " << 1 << " " << 3 << endl; int u; cin >> u; int p[1005]; p[0] = u - t; p[1] = s + t - u; p[2] = u - s; for (int i = 3; i < n - 1; i++) { int v; cout << "?" << " " << 1 << " " << i + 1 << endl; cin >> v; p[i] = v - u; u = v; } p[n - 1] = n * (n + 1) / 2 - u; cout << "!"; for (int i = 0; i < n; i++) { cout << " " << p[i]; } cout << endl; }