// // Created by HakuroKawashiro on 2024/8/2. // #include #include #include #include #define ll long long using namespace std; int main() { ll n; cin >> n; ll ans = 0, bs = 2; while(bs < 2000) { ll k = bs / 2; cout << bs << " " << k << endl; for (ll i = 1;i <= k;i++) { cout << bs - i << " "; } cout << endl; ll val; cin >> val; ans = ans + val * k; bs <<= 1ll; } cout << "0 1" << endl; cout << ans << endl; return 0; }