#include int main() { using namespace std; unsigned long N; cin >> N; vector A(N); iota(begin(A), end(A), 1); sort(begin(A), end(A), [](auto i, auto j){ cout << "? " << i << " " << j << endl; unsigned long x; cin >> x; return x; }); cout << "!" << endl; cout << N - 1 << endl; for(const auto a : A)cout << a << " "; cout << endl; return 0; }