#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) begin(v),end(v) #define fi first #define se second template inline bool chmax(A &a, B b) { if (a inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; } using ll = long long; using pii = pair; constexpr ll INF = 1ll<<30; constexpr ll longINF = 1ll<<60; constexpr ll MOD = 1000000007; constexpr bool debug = 0; //---------------------------------// bool ans[1123]; int main() { int N; cin >> N; memset(ans, -1, sizeof(ans)); REP(i, N) { ans[i] = 0; vector query; REP(j, N) if (ans[j]) query.push_back(j + 1); printf("? %d\n", query.size()); int res; REP(j, query.size()) printf("%d%c", query[j], j == query.size() - 1 ? '\n' : ' '); fflush(stdout); scanf("%d", &res); if (res == 0) ans[i] = 1; } vector ansv; REP(i, N) if (ans[i]) ansv.push_back(i + 1); REP(i, ansv.size()) printf("%d%c", ansv[i], i == ansv.size() - 1 ? '\n' : ' '); fflush(stdout); return 0; }