#include <bits/stdc++.h>   using namespace std;   const int limit = 10000;   int query(vector<long long> &v) {     int n = (int)v.size();     cout << n <<    ;     for (int i = 0; i < n; i++) {       cout << v[i] << (i == n - 1 ?   n  :    );     }     int k;     cin >> k;     if (k == -1) {       exit(0);     } else if (k == -2) {       assert(false);     }     return k;   }   int main() {     vector<vector<long long>> dp(6, vector<long long>(10010));     for (int q = 1; q <= 5; q++) {       for (long long p = 1; p <= limit; p++) {         if (q == 5 && p == 2) {           break;         }         long long x = p;         for (int i = 0; i < p; i++) {           x += dp[q - 1][min(10000LL, x)];           x++;         }         x += dp[q - 1][min(10000LL, x)];         dp[q][p] = x - p;       }     }     long long lb = 1, ub = 10004205361450474LL;     for (int q = 5; q >= 1; q--) {       vector<long long> hoge;       long long x = lb;       for (int i = 0; i < min(10000LL, lb); i++) {         x += dp[q - 1][min((long long)10000, x)];         hoge.push_back(x);         x++;       }       x += dp[q - 1][min(10000LL, x)];       int k = query(hoge);       if (k == 0) {         ub = hoge[0] - 1;       } else if (k == (int)hoge.size()) {         lb = hoge.back() + 1;       } else {         lb = hoge[k - 1] + 1;         ub = hoge[k] - 1;       }     }     return 0;   }   