#include <bits/stdc++.h>
using namespace std;
struct node {
  int si, i;
} a[610];
int n, root, fa[610], stk[610], tot, jl[610];
bool bz[610];
bool cmp(node x, node y) { return x.si < y.si; }
int main() {
  scanf("%d", &n);
  root = 1;
  a[1].si = n;
  a[1].i = 1;
  for (int i = 2; i <= n; i++) {
    printf("1\n%d\n", root);
    printf("%d\n", n - 1);
    for (int j = 2; j <= n; j++) printf("%d ", j);
    printf("\n%d\n", i);
    fflush(stdout);
    scanf("%d", &a[i].si);
    a[i].i = i;
  }
  sort(a + 1, a + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    tot = 0;
    for (int j = 1; j < i; j++)
      if (!bz[j]) stk[++tot] = a[j].i;
    if (tot) {
      printf("%d\n", tot);
      for (int j = 1; j <= tot; j++) printf("%d ", stk[j]);
      printf("\n1\n%d\n", root);
      printf("%d\n", a[i].i);
      fflush(stdout);
      int k;
      scanf("%d", &k);
      while (k--) {
        int l = 1, r = i - 1;
        while (l < r) {
          int mid = (l + r) / 2;
          tot = 0;
          for (int j = l; j <= mid; j++)
            if (!bz[j]) stk[++tot] = a[j].i;
          if (!tot) {
            l = mid + 1;
            continue;
            tot = 0;
          }
          printf("%d\n", tot);
          for (int j = 1; j <= tot; j++) printf("%d ", stk[j]);
          printf("\n1\n%d\n", root);
          printf("%d\n", a[i].i);
          fflush(stdout);
          int zhi;
          scanf("%d", &zhi);
          if (zhi)
            r = mid;
          else
            l = mid + 1;
        }
        fa[a[r].i] = a[i].i;
        bz[r] = 1;
      }
    }
  }
  printf("ANSWER\n");
  for (int i = 2; i <= n; i++) printf("%d %d\n", fa[i], i);
}
