#include <bits/stdc++.h>
using namespace std;
template <typename T>
void print(T begin, T end, char = ' ', string msg = "", char = '\n');
template <typename It, typename T>
void in(It, int, T (*)());
int si();
long long sl();
string ss(int);
char sc();
float sf();
double sd();
long double sld();
void pi(int, char = '\n');
void pl(long long, char = '\n');
void pf(float, char = '\n');
void pc(char, char = '\n');
void pdb(double, char = '\n');
void pldb(long double, char = '\n');
void ps(string, char = '\n');
template <typename T>
void pv(vector<T> v, char = ' ', char = '\n');
long long russian(long long, long long, long long);
long long fastpow(long long, long long, long long);
long long slowpow(long long, long long, long long);
long long _gcd(long long, long long);
long long _lcm(long long, long long);
long long extgcd(long long, long long, long long&, long long&);
long long _inv(long long, long long);
const int INF = 1e9;
const long long LINF = 1e18;
const int N = 500 + 7;
pair<int, int> S[N];
int par[N];
int n;
int getSize(int v) {
  printf("1\n1\n%d\n", n - 2);
  for (int i = 2; i <= n; ++i)
    if (i != v) printf("%d ", i);
  printf("\n%d\n", v);
  fflush(stdout);
  int a = si();
  return a;
}
int send(int vert, int l, int r, vector<int>& v) {
  if (r <= l) return 0;
  printf("1\n1\n%d\n", r - l);
  for (int j = l; j < r; ++j) printf("%d ", v[j]);
  printf("\n%d\n", vert);
  fflush(stdout);
  int a = si();
  return a;
}
int main() {
  n = si();
  S[1] = {n - 1, 1};
  if (n == 2) {
    ps("ANSWER");
    printf("1 2\n");
    fflush(stdout);
    return 0;
  }
  for (int i = 2; i <= n; ++i) S[i] = {getSize(i), i};
  sort(S + 1, S + n + 1);
  vector<int> v = {S[1].second};
  for (int i = 2; i <= n; ++i) {
    int l = 0, r = v.size();
    int vert = S[i].second;
    int ans = send(vert, l, r, v);
    while (ans) {
      while (l + 1 < r) {
        int m = (l + r) >> 1;
        if (send(vert, l, m, v) > 0)
          r = m;
        else
          l = m;
      }
      par[v[l]] = vert;
      swap(v.back(), v[l]);
      v.pop_back();
      r = v.size();
      ans = send(vert, l, r, v);
    }
    v.push_back(vert);
  }
  ps("ANSWER");
  for (int i = 2; i <= n; ++i) printf("%d %d\n", par[i], i);
  fflush(stdout);
  return 0;
}
template <typename T>
string get_token_pointer() {
  if (is_same<T, int*>::value) return "%d";
  if (is_same<T, long long*>::value) return "%lld";
  if (is_same<T, char*>::value) return "%c";
  if (is_same<T, double*>::value) return "%.8lf";
  if (is_same<T, long double*>::value) return "%.10Lf";
  if (is_same<T, float*>::value) return "%.6f";
  return "%d";
}
template <typename T>
string get_token() {
  if (is_same<T, int>::value) return "%d";
  if (is_same<T, long long>::value) return "%lld";
  if (is_same<T, char>::value) return "%c";
  if (is_same<T, double>::value) return "%.8lf";
  if (is_same<T, long double>::value) return "%.10Lf";
  if (is_same<T, float>::value) return "%.6f";
  return "%d";
}
template <typename It, typename T>
void in(It begin, int nn, T (*get)()) {
  while (nn--) *begin++ = get();
}
template <typename T>
T scanf_t(string s) {
  T a;
  scanf(s.c_str(), &a);
  return a;
}
template <typename T>
void printf_t(T a, string s, char end_l) {
  s.push_back(end_l);
  printf(s.c_str(), a);
}
template <typename T>
void print(T begin, T end, char sep, string msg, char end_l) {
  if (msg != "") {
    printf(msg.c_str());
    printf("\n");
  }
  string s = get_token_pointer<T>();
  s.push_back(sep);
  while (begin + 1 != end) {
    printf(s.c_str(), *begin);
    begin++;
  }
  if (begin != end) {
    s.back() = end_l;
    printf(s.c_str(), *begin);
  }
}
int si() { return scanf_t<int>("%d"); }
long long sl() { return scanf_t<long long>("%lld"); }
float sf() { return scanf_t<float>("%.6f"); }
char sc() { return scanf_t<char>(" %c"); }
double sdb() { return scanf_t<double>("%.8lf"); }
long double sldb() { return scanf_t<long double>("%.10Lf"); }
void pi(int a, char end_l) { printf_t<int>(a, "%d", end_l); }
void pl(long long a, char end_l) { printf_t<long long>(a, "%lld", end_l); }
void pf(float a, char end_l) { printf_t<float>(a, "%.6f", end_l); }
void pc(char a, char end_l) { printf_t<char>(a, "%c", end_l); }
void pdb(double a, char end_l) { printf_t<double>(a, "%.8lf", end_l); }
void pldb(long double a, char end_l) {
  printf_t<long double>(a, "%.10Lf", end_l);
}
void ps(string a, char end_l) {
  string s = "%s";
  s.push_back(end_l);
  printf(s.c_str(), a.c_str());
}
template <typename T>
void pv(vector<T> v, char sep, char end_l) {
  string s = get_token<T>();
  for (size_t i = 0; i < v.size() - 1; ++i) printf_t<T>(v[i], s, sep);
  if (!v.empty()) printf_t<T>(v.back(), s, end_l);
}
string ss(int NN) {
  char T[NN + 7];
  scanf("%s", T);
  return (string)T;
}
long long fastpow(long long a, long long k, long long m) {
  long long r = 1LL;
  while (k) {
    if (k & 1LL) r = (r * a) % m;
    a = (a * a) % m;
    k >>= 1LL;
  }
  return r;
}
long long slowpow(long long a, long long k, long long m) {
  long long r = 1LL;
  while (k) {
    if (k & 1LL) r = russian(r, a, m);
    a = russian(a, a, m);
    k >>= 1LL;
  }
  return r;
}
long long russian(long long a, long long k, long long m) {
  long long r = 0LL;
  while (k) {
    if (k & 1LL) r = (r + a) % m;
    a = (a + a) % m;
    k >>= 1LL;
  }
  return r;
}
long long _gcd(long long a, long long b) {
  while (b) swap(a %= b, b);
  return a;
}
long long _lcm(long long a, long long b) { return a / _gcd(a, b) * b; }
long long extgcd(long long a, long long b, long long& k, long long& l) {
  if (b == 0) {
    k = 1;
    l = 0;
    return a;
  }
  long long res = extgcd(b, a % b, l, k);
  l -= a / b * k;
  return res;
}
long long _inv(long long a, long long p) { return fastpow(a, p - 2, p); }
