Problem: This problem is interactive.

You should guess hidden number x which is between 1 and M = 10004205361450474, inclusive.

You could use up to 5 queries.

In each query, you can output an increasing sequence of k ≤ x integers, each between 1 and M, inclusive, and you will obtain one of the following as an answer:

  * either the hidden number belongs to your query sequence, in this case you immediately win; 
  * or you will be given where the hidden number is located with respect to your query sequence, that is, either it is less than all numbers from the sequence, greater than all numbers from the sequence, or you will be given such an i that the hidden number x is between the i-th and the (i+1)-st numbers of your sequence. 



See the interaction section for clarity.

Be aware that the interactor is adaptive, i.e. the hidden number can depend on queries the solution makes. However, it is guaranteed that for any solution the interactor works non-distinguishable from the situation when the hidden number is fixed beforehand.

Hacks are allowed only with fixed hidden number. A hack is represented by a single integer between 1 and M. In all pretests the hidden number is fixed as well.

Interaction

You can make up to 5 queries. To make a query print a number k (1 ≤ k ≤ 10^4) and then an increasing sequence t_0 < t_1 < … < t_{k-1} of k numbers, each between 1 and M, inclusive. If k > x, you lose.

You get one integer as a response. 

  * If it is -2, it means you made an invalid query or you lost. Exit immediately after receiving -2 and you will see Wrong answer verdict. Otherwise you can get an arbitrary verdict because your solution will continue to read from a closed stream. 
  * If it is -1, you guessed the number and should terminate too. 
  * Otherwise you get a number i between 0 and k, inclusive, denoting where the hidden number is, with respect to the printed numbers. If i = 0, then x < t_0. If i = k, then t_{k-1} < x. Otherwise t_{i-1} < x < t_i. 



After printing a query do not forget to output end of line and flush the output. Otherwise you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++;
  * System.out.flush() in Java;
  * flush(output) in Pascal;
  * stdout.flush() in Python;
  * see documentation for other languages.

Example

Input

 
2

0

-1

Output

2 2 3

2 20 30

3 5 7 9

Note

In the first example the number 5 is hidden.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
std::istream& operator>>(std::istream& i, pair<T, U>& p) {
  i >> p.first >> p.second;
  return i;
}
template <typename T>
std::istream& operator>>(std::istream& i, vector<T>& t) {
  for (auto& v : t) {
    i >> v;
  }
  return i;
}
template <typename T, typename U>
std::ostream& operator<<(std::ostream& o, const pair<T, U>& p) {
  o << p.first << ' ' << p.second;
  return o;
}
template <typename T>
std::ostream& operator<<(std::ostream& o, const vector<T>& t) {
  if (t.empty()) o << '\n';
  for (size_t i = 0; i < t.size(); ++i) {
    o << t[i] << " \n"[i == t.size() - 1];
  }
  return o;
}
template <typename T>
using minheap = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
using maxheap = priority_queue<T, vector<T>, less<T>>;
template <typename T>
bool in(T a, T b, T c) {
  return a <= b && b < c;
}
unsigned int logceil(int first) {
  return 8 * sizeof(int) - __builtin_clz(first);
}
namespace std {
template <typename T, typename U>
struct hash<pair<T, U>> {
  hash<T> t;
  hash<U> u;
  size_t operator()(const pair<T, U>& p) const {
    return t(p.first) ^ (u(p.second) << 7);
  }
};
}  // namespace std
template <typename T, typename F>
T bsh(T l, T h, const F& f) {
  T r = -1, m;
  while (l <= h) {
    m = (l + h) / 2;
    if (f(m)) {
      l = m + 1;
      r = m;
    } else {
      h = m - 1;
    }
  }
  return r;
}
template <typename F>
double bshd(double l, double h, const F& f, double p = 1e-9) {
  unsigned int r = 3 + (unsigned int)log2((h - l) / p);
  while (r--) {
    double m = (l + h) / 2;
    if (f(m)) {
      l = m;
    } else {
      h = m;
    }
  }
  return (l + h) / 2;
}
template <typename T, typename F>
T bsl(T l, T h, const F& f) {
  T r = -1, m;
  while (l <= h) {
    m = (l + h) / 2;
    if (f(m)) {
      h = m - 1;
      r = m;
    } else {
      l = m + 1;
    }
  }
  return r;
}
template <typename F>
double bsld(double l, double h, const F& f, double p = 1e-9) {
  unsigned int r = 3 + (unsigned int)log2((h - l) / p);
  while (r--) {
    double m = (l + h) / 2;
    if (f(m)) {
      h = m;
    } else {
      l = m;
    }
  }
  return (l + h) / 2;
}
template <typename T>
T gcd(T a, T b) {
  if (a < b) swap(a, b);
  return b ? gcd(b, a % b) : a;
}
template <typename T>
class vector2 : public vector<vector<T>> {
 public:
  vector2() {}
  vector2(size_t a, size_t b, T t = T())
      : vector<vector<T>>(a, vector<T>(b, t)) {}
};
template <typename T>
class vector3 : public vector<vector2<T>> {
 public:
  vector3() {}
  vector3(size_t a, size_t b, size_t c, T t = T())
      : vector<vector2<T>>(a, vector2<T>(b, c, t)) {}
};
template <typename T>
class vector4 : public vector<vector3<T>> {
 public:
  vector4() {}
  vector4(size_t a, size_t b, size_t c, size_t d, T t = T())
      : vector<vector3<T>>(a, vector3<T>(b, c, d, t)) {}
};
template <typename T>
class vector5 : public vector<vector4<T>> {
 public:
  vector5() {}
  vector5(size_t a, size_t b, size_t c, size_t d, size_t e, T t = T())
      : vector<vector4<T>>(a, vector4<T>(b, c, d, e, t)) {}
};
constexpr long long up = 10004205361450474LL;
class TaskG {
 public:
  map<pair<pair<long long, long long>, int>, vector<long long>> M;
  unordered_map<pair<pair<long long, long long>, int>, bool> C;
  vector<long long> INTSIZE;
  bool canSolve(long long lo, long long hi, int depth) {
    if ((hi - lo) > INTSIZE[depth]) return false;
    if (lo >= 10000) return true;
    auto it = C.find({{lo, hi}, depth});
    if (it != C.end()) return it->second;
    if (depth == 1) {
      if (hi <= min(2 * lo, lo + 10000))
        return true;
      else
        return false;
    } else {
      long long l = lo;
      for (int i = 0; i <= min(lo, 10000LL); ++i) {
        long long r =
            bsh(l, hi, [&](long long z) { return canSolve(l, z, depth - 1); });
        M[{{lo, hi}, depth}].push_back(r);
        if (r >= hi) {
          M[{{lo, hi}, depth}].pop_back();
          C[{{lo, hi}, depth}] = true;
          return true;
        }
        l = r + 1;
      }
      return C[{{lo, hi}, depth}] = false;
    }
  }
  void solve(istream& cin, ostream& cout) {
    INTSIZE.resize(5);
    INTSIZE[0] = 0;
    for (int l = 0; l < 4; ++l) INTSIZE[l + 1] = INTSIZE[l] * 10001 + 10000;
    vector<long long> H{204761410474LL};
    cerr << canSolve(1, H[0], 4);
    int d = 5;
    long long lo = 1;
    long long hi = up + 1;
    while (d > 0) {
      auto& G = d == 5 ? H : M[{{lo, hi}, d}];
      cerr << lo << ' ' << hi << endl;
      if (G.empty()) {
        if (d == 1) {
          for (long long i = lo; i < hi; ++i) {
            G.push_back(i);
            if (G.size() == 10000) break;
          }
        } else {
          for (long long s = lo + INTSIZE[d - 1]; s < hi;
               s += INTSIZE[d - 1] + 1) {
            G.push_back(s);
            if (G.size() == 10000) break;
          }
        }
      }
      cout << G.size() << ' ' << G;
      flush(cout);
      int ans;
      cin >> ans;
      if (ans < 0) return;
      if (ans != 0) {
        lo = G[ans - 1] + 1;
      }
      if (ans != G.size()) {
        hi = G[ans];
      }
      --d;
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  TaskG solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}