#include #include using namespace std; using namespace atcoder; typedef long long ll; //typedef modint998244353 mint; typedef modint1000000007 mint; //const int MOD = 998244353; const int MOD = 1000000007; #define all(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) const int inf = 1 << 30; const ll INF = 1LL << 60; const int dx[8] = {1, 0, -1, 0, -1, -1, 1, 1}; const int dy[8] = {0, 1, 0, -1, -1, 1, -1, 1}; template bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; } int main(){ int n; cin >> n; vector ans(n); int sum = (n + 1) * n / 2; vector r(n, 0); rep(i, n - 2){ int a; cout << "? " << i + 2 << ' ' << n << endl; cin >> a; ans[i] = sum - a - r[i]; r[i + 1] = r[i] + ans[i]; } int a; cout << "? " << 1 << ' ' << n - 1 << endl; cin >> a; ans[n - 1] = sum - a; set s; rep(i, n) s.insert(i + 1); rep(i, n) s.erase(ans[i]); ans[n - 2] = *rbegin(s); cout << "! "; rep(i, n) cout << ans[i] << ' '; cout << endl; //4 3 5 1 2 return 0; }