#include <bits/stdc++.h>
using namespace std;
const int N = 510;
const int M = 1e9 + 7;
template <class T>
inline T read(T &x) {
  int f = 1;
  char ch = getchar();
  x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x *= f;
}
int n;
struct Size {
  int x, id;
  int operator<(const Size other) const { return x < other.x; }
} s[N];
int f[N], m, arr[N];
int st, l, r, mid, ans;
int Check(int S) {
  printf("1\n1\n%d\n", mid - st + 1);
  for (int(i) = (st); (i) <= (mid); (i)++) printf("%d ", arr[i]);
  printf("\n%d\n", S);
  fflush(stdout);
  int Return;
  read(Return);
  return Return;
}
int main() {
  read(n);
  s[1] = {n, 1};
  for (int(i) = (2); (i) <= (n); (i)++) {
    printf("1\n1\n%d\n", n - 1);
    for (int(j) = (2); (j) <= (n); (j)++) printf("%d ", j);
    printf("\n%d\n", i);
    fflush(stdout);
    read(s[i].x), s[i].id = i;
  }
  sort(s + 1, s + n + 1);
  for (int(i) = (1); (i) <= (n); (i)++) {
    if (s[i].x == 1) continue;
    ans = m = 0;
    for (int(j) = (1); (j) <= (i - 1); (j)++)
      if (!f[s[j].id]) arr[++m] = s[j].id;
    while (true) {
      st = l = ans + 1, r = m;
      ans = 0;
      while (l <= r) {
        mid = (l + r) / 2;
        if (Check(s[i].id))
          r = (ans = mid) - 1;
        else
          l = mid + 1;
      }
      if (!ans) break;
      f[arr[ans]] = s[i].id;
    }
  }
  puts("ANSWER");
  for (int(i) = (1); (i) <= (n); (i)++)
    if (f[i]) printf("%d %d\n", i, f[i]);
  fflush(stdout);
  return 0;
}
