#include <bits/stdc++.h>
using namespace std;
const int N = 510;
int n, fa[N];
pair<int, int> a[N];
set<int> s;
int lf[N], len = 0;
void dfs(int u, int l, int r) {
  if (l >= r) {
    fa[lf[l]] = u, s.erase(lf[l]);
    return;
  }
  int mid = (l + r) >> 1, sum;
  printf("%d\n", mid - l + 1);
  for (int i = (l), ied = (mid); i <= ied; i++) printf("%d ", lf[i]);
  puts("");
  printf("1\n1\n%d\n", u);
  cout.flush(), scanf("%d", &sum);
  if (sum) dfs(u, l, mid);
  printf("%d\n", r - mid);
  for (int i = (mid + 1), ied = (r); i <= ied; i++) printf("%d ", lf[i]);
  puts("");
  printf("1\n1\n%d\n", u);
  cout.flush(), scanf("%d", &sum);
  if (sum) dfs(u, mid + 1, r);
}
int main() {
  scanf("%d", &n);
  if (n == 2) {
    puts("ANSWER\n1 2");
    return 0;
  }
  for (int i = (2), ied = (n); i <= ied; i++) {
    a[i - 1].second = i;
    printf("%d\n", n - 2);
    for (int j = (2), jed = (n); j <= jed; j++)
      if (j ^ i) printf("%d ", j);
    puts("");
    printf("1\n1\n%d\n", i);
    cout.flush(), scanf("%d", &a[i - 1].first);
  }
  sort(a + 1, a + n);
  for (int i = 1; i <= n; i++)
    ;
  for (int i = (1), ied = (n - 1); i <= ied; i++) {
    if (!a[i].first) {
      s.insert(a[i].second);
      continue;
    }
    len = 0;
    for (set<int>::iterator it = s.begin(); it != s.end(); ++it)
      lf[++len] = *it;
    dfs(a[i].second, 1, len), s.insert(a[i].second);
  }
  for (set<int>::iterator it = s.begin(); it != s.end(); ++it) fa[*it] = 1;
  puts("ANSWER");
  for (int i = (2), ied = (n); i <= ied; i++) printf("%d %d\n", fa[i], i);
  return 0;
}
