#include <bits/stdc++.h>
using namespace std;
long long jans, mx = 10004205361450474, fn = 204761410474;
void get() {
  cout << endl;
  cin >> jans;
  if (jans == -1 || jans == -2) exit(0);
}
int main() {
  cout << 1 << ' ' << fn;
  get();
  if (jans == 0) {
    cout << 1 << ' ' << 2046;
    get();
    if (jans == 0) {
      cout << 1 << ' ' << 6;
      get();
      if (jans == 0) {
        cout << 1 << ' ' << 2;
        get();
        if (jans == 0) {
          cout << 1 << ' ' << 1;
          get();
        } else {
          cout << 3 << ' ' << 3 << ' ' << 4 << ' ' << 5;
          get();
        }
      } else {
        cout << 7 << ' ' << 14 << ' ' << 30 << ' ' << 62 << ' ' << 126 << ' '
             << 254 << ' ' << 510 << ' ' << 1022;
        get();
        long long t2 = (1 << jans) * 8 - 1;
        cout << t2 << ' ';
        for (int i = 0; i < t2; i++) {
          cout << t2 + i << ' ';
        }
        get();
      }
    } else {
      cout << 2047 << ' ';
      for (long long i = 0; i < 2047; i++) {
        cout << (long long)20468427 +
                    ((long long)10001) * ((long long)10001) * i
             << ' ';
      }
      get();
      if (jans == 0) {
        cout << 2047 << ' ' << 4094 << ' ' << 8190 << ' ';
        for (long long i = 0; i < 2045; i++) {
          cout << (long long)16382 + ((long long)10001) * i << ' ';
        }
        get();
        if (jans <= 2) {
          int t2 = (1 << 11) * (jans + 1) - 1;
          if (jans == 2) t2 = (1 << 13) - 1;
          cout << t2 << ' ';
          for (int i = 0; i < t2; i++) {
            cout << t2 + i << ' ';
          }
          get();
        } else {
          long long t2 = 16382 + ((long long)10001) * (jans - 3) + 1;
          cout << 10000 << ' ';
          for (long long i = 0; i < 10000; i++) {
            cout << t2 + i << ' ';
          }
          get();
        }
      } else {
        long long bb = 20468427 +
                       ((long long)10001) * ((long long)10001) * (jans - 1),
                  ee = bb + ((long long)10001) * ((long long)10001);
        for (int i = 0; i < 2; i++) {
          cout << 10000 << ' ';
          for (int j = 0; j < 10000; j++) {
            cout << bb + (j + 1) * (ee - bb + 1) / ((long long)10001) << ' ';
          }
          get();
          long long xx = ee - bb + 1;
          bb += jans * (xx / ((long long)10001));
          ee = bb + xx / ((long long)10001) - 1;
        }
      }
    }
  } else {
    long long bb = fn, ee = mx;
    for (long long i = 0; i < 4; i++) {
      cout << 10000 << ' ';
      for (long long j = 0; j < 10000; j++) {
        cout << bb + (j + 1) * ((ee - bb + 1) / ((long long)10001)) << ' ';
      }
      get();
      long long xx = ee - bb + 1;
      bb += jans * (xx / ((long long)10001));
      ee = bb + xx / ((long long)10001) - 1;
    }
  }
  return 0;
}
