#include #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) std::begin(x), std::end(x) using namespace std; using ll = long long; void opvec1(vector &vec); void opvec2(vector> &vec); void opset(set &S); int main() { int N; cin >> N; vector sum(N - 1); rep(i, N - 1) { cout << "? " << i+1 << " " << i+2 << endl; cin >> sum[i]; } for (int i = 1; i <= N; i++) { vector ans(N); ans[0] = i; rep(j, N - 1) { ans[j + 1] = sum[j] - ans[j]; if (ans[j + 1] <= 0 || ans[j + 1] > N) break; } set S(all(ans)); if (ans.back() > 0 and (int)S.size() == N) { cout << "!"; for (auto a: ans) { cout << " " << a; } cout << endl; } } } // void opvec1(vector &vec) { rep(i, vec.size()) cout << vec[i] << " "; cout << endl; } void opvec2(vector> &vec) { rep(i, vec.size()) { rep(j, vec[0].size()) cout << vec[i][j] << " "; cout << endl; } } void opset(set &S) { for (auto s: S) cout << s << " "; cout << endl; }