Problem: This is an interactive problem.

The judge has a hidden rooted full binary tree with n leaves. A full binary tree is one where every node has either 0 or 2 children. The nodes with 0 children are called the leaves of the tree. Since this is a full binary tree, there are exactly 2n - 1 nodes in the tree. The leaves of the judge's tree has labels from 1 to n. You would like to reconstruct a tree that is isomorphic to the judge's tree. To do this, you can ask some questions.

A question consists of printing the label of three distinct leaves a1, a2, a3. Let the depth of a node be the shortest distance from the node to the root of the tree. Let LCA(a, b) denote the node with maximum depth that is a common ancestor of the nodes a and b.

Consider X = LCA(a1, a2), Y = LCA(a2, a3), Z = LCA(a3, a1). The judge will tell you which one of X, Y, Z has the maximum depth. Note, this pair is uniquely determined since the tree is a binary tree; there can't be any ties. 

More specifically, if X (or Y, Z respectively) maximizes the depth, the judge will respond with the string "X" (or "Y", "Z" respectively). 

You may only ask at most 10·n questions.

Input

The first line of input will contain a single integer n (3 ≤ n ≤ 1 000) — the number of leaves in the tree.

Output

To print the final answer, print out the string "-1" on its own line. Then, the next line should contain 2n - 1 integers. The i-th integer should be the parent of the i-th node, or -1, if it is the root.

Your answer will be judged correct if your output is isomorphic to the judge's tree. In particular, the labels of the leaves do not need to be labeled from 1 to n. Here, isomorphic means that there exists a permutation π such that node i is the parent of node j in the judge tree if and only node π(i) is the parent of node π(j) in your tree.

Interaction

To ask a question, print out three distinct integers a1, a2, a3. These integers should be between 1 and n, inclusive.

The judge will respond with a single character, either "X", "Y", "Z". 

If the string is "X" (or "Y", "Z" respectively), that means the pair (a1, a2) (or (a2, a3), (a3, a1) respectively) has the deepest LCA among the three pairs.

You may only ask a question at most 10·n times, otherwise, you will get Wrong Answer.

When you are ready to answer, print out a single integer "-1" on its own line. The next line should contain 2n - 1 integers. The i-th integer should be the parent of the i-th node, or -1, if it is the root. Do not forget to flush the final answer as well. Printing the answer does not count as asking a question.

You will get Wrong Answer verdict if 

  * Your question or answers are not in the format described in this statement. 
  * You ask strictly more than 10·n questions. 
  * Your question contains duplicate indices. 
  * Your final answer is not isomorphic to the judge tree. 



You will get Idleness Limit Exceeded if you don't print anything or if you forget to flush the output, including for the final answer (more info about flushing output below).

To flush you can use (just after printing an integer and end-of-line): 

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



If at any moment your program reads -1 as an answer, it should immediately exit normally (for example, by calling exit(0)). You will get Wrong Answer in this case, it means that you made more queries than allowed, or made an invalid query. If you ignore this, you can get other verdicts since your program will continue to read from a closed stream.

Hacking To hack someone, use the following format 
    
    
      
    n  
    p_1 p_2 ... p_{2n-1}  
    

This denotes a tree where the parent of the i-th node is pi (pi = - 1 or n < pi ≤ 2n - 1). If pi is equal to -1, then node i is the root. This input must describe a valid full rooted binary tree.

Of course, contestant programs will not be able to see this input.

Example

Input

5
X
Z
Y
Y
X<span class="tex-font-style-tt"></span>


Output

1 4 2
1 2 4
2 4 1
2 3 5
2 4 3
-1
-1 1 1 2 2 3 3 6 6

Note

For the first sample, the judge has the hidden tree:

<image>

Here is a more readable format of the interaction: 

<image> The last line can also be 8 6 9 8 9 7 -1 6 7. 

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
typedef struct Querytype {
  int a, b, c;
  bool operator==(const Querytype &other) const {
    return a == other.a && b == other.b && c == other.c;
  }
} Query;
namespace std {
template <>
struct hash<Query> {
  std::size_t operator()(const Query &k) const {
    return (k.a * 1001 + k.b) * 1001 + k.c;
  }
};
}  // namespace std
int n, nn;
vector<int> edges[2 * 1001];
unordered_map<Query, char> q;
inline bool lsize(int x) { return x <= n; }
inline bool lnode(int x) { return x > n; }
struct CENT {
  typedef bool (*SZ_COUNTER)(int);
  typedef bool (*ND_COUNTER)(int);
  int *cmax, *csize, n;
  vector<int> nodes;
  bool *rem;
  SZ_COUNTER cntr;
  ND_COUNTER nntr;
  vector<pair<int, vector<int>>> cents;
  vector<map<int, int>> cents_orig;
  CENT(int n, SZ_COUNTER cntr, ND_COUNTER nntr) : n(n), cntr(cntr), nntr(nntr) {
    cmax = (int *)malloc((this->n + 1) * sizeof(int));
    csize = (int *)malloc((this->n + 1) * sizeof(int));
    rem = (bool *)malloc((this->n + 1) * sizeof(bool));
    memset(rem, false, (this->n + 1) * sizeof(bool));
  }
  ~CENT() {
    free(cmax);
    free(csize);
    free(rem);
  }
  void dfs(int x, int p) {
    nodes.push_back(x);
    csize[x] = cntr(x) ? 1 : 0;
    cmax[x] = 0;
    for (auto i : edges[x])
      if (i != -1 && i != p && !rem[i]) {
        dfs(i, x);
        csize[x] += csize[i];
        if (csize[i] > cmax[x]) cmax[x] = csize[i];
      }
  }
  void decompose() {
    cents.clear();
    vector<int> ztl;
    map<int, int> zml;
    cents.push_back(make_pair(0, ztl));
    cents_orig.push_back(zml);
    queue<pair<int, int>> q;
    q.push(make_pair(1, 0));
    while (!q.empty()) {
      auto t = q.front();
      q.pop();
      nodes.clear();
      dfs(t.first, -1);
      int ct = -1;
      for (auto i : nodes)
        if (csize[i] * 2 >= csize[t.first] && cmax[i] * 2 <= csize[t.first] &&
            nntr(i)) {
          ct = i;
          break;
        }
      if (ct == -1) ct = t.first;
      vector<int> ctl;
      cents.push_back(make_pair(ct, ctl));
      cents_orig.push_back(zml);
      int cti = cents.size() - 1, ki = 0;
      cents[t.second].second.push_back(cti);
      for (auto i : edges[ct])
        if (i != -1 && !rem[i]) {
          q.push(make_pair(i, cti));
          cents_orig[cti][i] = ki++;
        }
      rem[ct] = true;
    }
  }
};
int get_leaf(int x) {
  if (edges[x].size() <= 1)
    return x;
  else
    return get_leaf(edges[x][1]);
}
char query(int a, int b, int c) {
  bool bab = false;
  if (a > b) {
    swap(b, a);
    bab = true;
  }
  Query qq = {.a = a, .b = b, .c = c};
  if (q.find(qq) == q.end()) {
    cout << a << " " << b << " " << c << endl;
    cin >> q[qq];
  }
  return !bab || q[qq] == 'X' ? q[qq] : (q[qq] == 'Y' ? 'Z' : 'Y');
}
inline int vfind(const vector<int> &x, int v) {
  return find(x.begin(), x.end(), v) - x.begin();
}
void run(int x) {
  CENT cent(2 * n - 1, &lsize, &lnode);
  cent.decompose();
  int i = 1;
  while (true) {
    auto ct = cent.cents[i].first;
    auto cm = cent.cents_orig[i];
    const auto &cp = cent.cents[i].second;
    char q = query(get_leaf(edges[ct][1]), get_leaf(edges[ct][2]), x);
    if (q == 'X') {
      if (cm.find(edges[ct][0]) == cm.end()) {
        if (edges[ct][0] != -1) {
          int idx = vfind(edges[edges[ct][0]], ct);
          edges[edges[ct][0]][idx] = nn;
          edges[nn].push_back(edges[ct][0]);
        } else
          edges[nn].push_back(-1);
        edges[ct][0] = nn;
        edges[x].push_back(nn);
        edges[nn].push_back(ct);
        edges[nn].push_back(x);
        nn++;
        break;
      } else
        i = cp[cm[edges[ct][0]]];
    } else {
      int k = q == 'Y' ? 2 : 1;
      if (cm.find(edges[ct][k]) == cm.end() || !lnode(edges[ct][k])) {
        int ke = edges[ct][k];
        edges[ke][0] = nn;
        edges[ct][k] = nn;
        edges[x].push_back(nn);
        edges[nn].push_back(ct);
        edges[nn].push_back(ke);
        edges[nn].push_back(x);
        nn++;
        break;
      } else
        i = cp[cm[edges[ct][k]]];
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  edges[1].push_back(n + 1);
  edges[2].push_back(n + 1);
  edges[n + 1].push_back(-1);
  edges[n + 1].push_back(1);
  edges[n + 1].push_back(2);
  nn = n + 2;
  for (int i = 3; i <= n; i++) run(i);
  cout << -1 << endl;
  for (int i = 1; i < 2 * n - 1; i++) cout << edges[i][0] << " ";
  cout << edges[2 * n - 1][0] << endl;
  return 0;
}