#include "bits/stdc++.h" using namespace std; typedef long long int ll; typedef vector vl; typedef pair PP; #define rep(i,n) for(ll i = 0; i < ll(n); i++) #define all(v) v.begin() , v.end() #define inputv(v,n) rep(i,n){\ ll x;\ cin>>x;\ v.push_back(x);\ } const ll INF = 999999999999999; const ll MOD = 1000000007; ll a, b, c, d, e, f, p, t, x, y, z, q, m, n, r, h, k, w, l, ans = 0; int main() { vl A; cin >> n; rep(i, n) { cout << "? 1" << endl; fflush(stdout); cout << i+1 << endl; fflush(stdout); cin >> x; if (x == 1)A.push_back(i + 1); } cout << "! " << A.size() << endl; fflush(stdout); rep(i, A.size()) { cout << A[i]; if (i != A.size())cout << " "; } fflush(stdout); }