#include <bits/stdc++.h>
using namespace std;
using ull = uint64_t;
using ll = int64_t;
using ld = long double;
int q(int v, vector<int> u) {
  cout << "1\n1\n" << u.size() << "\n";
  for (int x : u) {
    cout << x << " ";
  }
  cout << "\n" << v << "\n";
  cout.flush();
  int y;
  cin >> y;
  return y;
}
const int N = 501;
pair<int, int> p[N];
int sz[N];
vector<pair<int, int>> ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout.setf(ios::fixed);
  cout.precision(20);
  int n;
  cin >> n;
  p[0] = {n, 1};
  sz[1] = n;
  vector<int> ver(n - 1);
  iota(ver.begin(), ver.end(), 2);
  for (int i = 2; i <= n; ++i) {
    p[i - 1] = {sz[i] = q(i, ver), i};
  }
  sort(p, p + n);
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    int v = p[i].second;
    int cs = sz[v];
    while (cs > 1) {
      int l = 0, r = a.size();
      while (l + 1 < r) {
        int md = (l + r) / 2;
        (q(v, vector<int>{a.begin(), a.begin() + md}) ? r : l) = md;
      }
      cs -= sz[a[l]];
      ans.emplace_back(v, a[l]);
      a.erase(a.begin() + l);
    }
    a.push_back(v);
    assert(cs == 1);
  }
  assert(a.size() == 1);
  cout << "ANSWER\n";
  for (auto ed : ans) {
    cout << ed.first << " " << ed.second << "\n";
  }
  cout.flush();
}
