#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int n, sub[N], par[N];
vector<int> wp;
vector<pair<int, int> > v;
bool check(int u, int x) {
  cout << x + 1 << endl;
  for (int i = 0; i < x + 1; i++) cout << wp[i] << " ";
  cout << endl << 1 << endl << 1 << endl << u << endl;
  int res;
  cin >> res;
  cout << endl;
  return (0 < res);
}
void find_sub(int x) {
  cout << n - 1 << endl;
  for (int i = 2; i < n + 1; i++) cout << i << " ";
  cout << endl << 1 << endl << 1 << endl << x << endl;
  cin >> sub[x];
  cout << endl;
  v.push_back(make_pair(sub[x], x));
}
void solve(int x) {
  while (1) {
    int l = -1, r = int(wp.size()), mid;
    while (l + 1 < r) {
      mid = (l + r) / 2;
      if (check(x, mid))
        r = mid;
      else
        l = mid;
    }
    if (r == int(wp.size())) break;
    par[wp[r]] = x;
    wp.erase(wp.begin() + r);
  }
  wp.push_back(x);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  v.push_back(make_pair(n, 1));
  for (int i = 2; i < n + 1; i++) find_sub(i);
  sort(v.begin(), v.end());
  for (int i = 0; i < n; i++) solve(v[i].second);
  cout << "ANSWER" << endl;
  for (int i = 2; i < n + 1; i++) cout << i << " " << par[i] << endl;
}
