#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; ans.emplace_back(i); bool flag = true; rep(j, N - 1) { ans.emplace_back(sum[j] - ans.back()); if (ans.back() <= 0 || ans.back() > N) { flag = false; break; } } set S(all(ans)); if (flag 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; }