#include <bits/stdc++.h>
using namespace std;
template <typename Tp>
inline void read(Tp &x) {
  static char c;
  static bool neg;
  x = 0, c = getchar(), neg = false;
  for (; !isdigit(c); c = getchar()) {
    if (c == '-') {
      neg = true;
    }
  }
  for (; isdigit(c); c = getchar()) {
    x = x * 10 + c - '0';
  }
  if (neg) {
    x = -x;
  }
}
const int N = 500 + 5;
int n;
int siz[N];
set<int> st;
inline void querySize() {
  siz[1] = n;
  for (int x = 2, res; x <= n; ++x) {
    printf("%d\n", n - 1);
    for (int i = 2; i <= n; ++i) {
      printf("%d ", i);
    }
    printf("\n1\n1\n%d\n", x);
    fflush(stdout);
    scanf("%d", &res);
    siz[x] = res;
  }
}
inline int check(int u, int l, int r) {
  auto iter = st.begin();
  advance(iter, l - 1);
  printf("%d\n", r - l + 1);
  for (int i = 0; i <= r - l; ++i) {
    printf("%d ", *iter);
    ++iter;
  }
  printf("\n1\n1\n%d\n", u);
  fflush(stdout);
  int res;
  scanf("%d", &res);
  return res;
}
int p[N];
inline bool comp(const int &x, const int &y) { return siz[x] < siz[y]; }
int main() {
  scanf("%d", &n);
  querySize();
  for (int i = 1; i <= n; ++i) {
    p[i] = i;
  }
  sort(p + 1, p + n + 1, comp);
  vector<pair<int, int> > ans;
  ans.reserve(n);
  for (int i = 1, u; i <= n; ++i) {
    u = p[i];
    if (!st.empty()) {
      while (!st.empty() && check(u, 1, (int)st.size())) {
        int l = 1, r = (int)st.size(), mid;
        while (l <= r) {
          mid = (l + r) >> 1;
          if (check(u, l, mid)) {
            r = mid - 1;
          } else {
            l = mid + 1;
          }
        }
        auto iter = st.begin();
        advance(iter, l - 1);
        ans.emplace_back(u, *iter);
        st.erase(iter);
      }
    }
    st.emplace(p[i]);
  }
  puts("ANSWER");
  for (const auto &p : ans) {
    printf("%d %d\n", p.first, p.second);
  }
}
