Problem: This is an interactive problem.

A legendary tree rests deep in the forest. Legend has it that individuals who realize this tree would eternally become a Legendary Grandmaster.

To help you determine the tree, Mikaela the Goddess has revealed to you that the tree contains n vertices, enumerated from 1 through n. She also allows you to ask her some questions as follows. For each question, you should tell Mikaela some two disjoint non-empty sets of vertices S and T, along with any vertex v that you like. Then, Mikaela will count and give you the number of pairs of vertices (s, t) where s ∈ S and t ∈ T such that the simple path from s to t contains v.

Mikaela the Goddess is busy and will be available to answer at most 11 111 questions.

This is your only chance. Your task is to determine the tree and report its edges.

Input

The first line contains an integer n (2 ≤ n ≤ 500) — the number of vertices in the tree.

Output

When program has realized the tree and is ready to report the edges, print "ANSWER" in a separate line. Make sure that all letters are capitalized.

Then, print n-1 lines, each containing two space-separated integers, denoting the vertices that are the endpoints of a certain edge. Each edge should be reported exactly once. Your program should then immediately terminate.

Interaction

For each question that you wish to ask, interact as follows.

  1. First, print the size of S in its own line. In the following line, print |S| space-separated distinct integers, denoting the vertices in S. 
  2. Similarly, print the size of T in its own line. In the following line, print |T| space-separated distinct integers, denoting the vertices in T. 
  3. Then, in the final line, print v — the vertex that you choose for this question. 
  4. Read Mikaela's answer from input. 



Be reminded that S and T must be disjoint and non-empty.

After printing a query do not forget to output end of line and flush the output. Otherwise you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++; 
  * System.out.flush() in Java; 
  * flush(output) in Pascal; 
  * stdout.flush() in Python; 
  * see documentation for other languages. 



If your program asks too many questions, asks an invalid question or does not correctly follow the interaction guideline above, it may receive an arbitrary verdict. Otherwise, your program will receive the Wrong Answer verdict if it reports an incorrect tree.

Note that the tree is fixed beforehand and does not depend on your queries.

Hacks

Hacks should be formatted as follows.

The first line should contain a single integer n (2 ≤ n ≤ 500) — the number of vertices in the tree.

The following n-1 lines should each contain two space-separated integers u and v, denoting the existence of an undirected edge (u, v) (1 ≤ u, v ≤ n).

Example

Input

5
5


Output

3
1 2 3
2
4 5
2
ANSWER
1 2
2 3
3 4
2 5

Note

In the sample, the tree is as follows.

<image>

n = 5 is given to the program. The program then asks Mikaela a question where S = \{1, 2, 3\}, T = \{4, 5\}, and v = 2, to which she replies with 5 (the pairs (s, t) are (1, 4), (1, 5), (2, 4), (2, 5), and (3, 5)).

Solution (in CPP):

Solution:
#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); }