#include #include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace __gnu_pbds; template using ordered_set = tree, rb_tree_tag, tree_order_statistics_node_update>; int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int n; cin >> n; vector a(n); rep(i, n) { cout << "? " << 1 << " " << i + 1 << endl; cin >> a[i]; } for (int i = n - 1; i > 0; i--) { a[i] -= a[i - 1]; } // for (int i : a) // cout << i << " "; // cout << endl; ordered_set s; rep(i, n) s.insert(i + 1); vector ans(n); for (int i = n - 1; i >= 0; i--) { int x = *s.find_by_order(s.size() - 1 - a[i]); ans[i] = x; s.erase(x); } cout << "!"; for (int i : ans) cout << " " << i; cout << endl; return 0; }