#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int n, sz[N], p[N];
set<int> st;
vector<int> v[N];
int check(int pos, int l, int r) {
  auto it = st.begin();
  cout << r - l + 1 << endl;
  for (int i = 1; i < l; i++) ++it;
  for (int i = l; i <= r; i++) cout << *it++ << ' ';
  cout << endl;
  cout << "1\n1\n" << pos << endl;
  int x;
  cin >> x;
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  sz[1] = n;
  for (int i = 2; i <= n; i++) {
    cout << n - 1 << endl;
    for (int i = 2; i <= n; i++) cout << i << ' ';
    cout << "\n1\n1\n" << i << endl;
    cin >> sz[i];
  }
  for (int i = 1; i <= n; i++) p[i] = i;
  sort(p + 1, p + n + 1, [](int x, int y) { return sz[x] > sz[y]; });
  vector<pair<int, int>> ans;
  for (int i = n; i > 0; --i) {
    if (!st.empty()) {
      int l, r;
      while (!st.empty() && check(p[i], 1, st.size())) {
        l = 1;
        r = st.size();
        while (l <= r) {
          int mid = (l + r) >> 1;
          if (check(p[i], l, mid))
            r = mid - 1;
          else
            l = mid + 1;
        }
        auto it = st.begin();
        for (int j = 1; j < l; j++) ++it;
        ans.push_back({p[i], *it});
        st.erase(*it);
      }
    }
    st.insert(p[i]);
  }
  cout << "ANSWER" << endl;
  for (auto &i : ans) cout << i.first << ' ' << i.second << endl;
  return 0;
}
