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;
int n;
class DEBUG {
 public:
  int dep[2010], st[2010][12];
  vector<int> v[2010];
  void dfs(int np) {
    for (int &x : v[np]) {
      dep[x] = dep[np] + 1;
      dfs(x);
    }
  }
  void init() {}
  int query(int x, int y) {
    if (dep[x] < dep[y]) swap(x, y);
    for (int i = 11; i >= 0; i--) {
      if (dep[st[x][i]] >= dep[y]) x = st[x][i];
    }
    for (int i = 11; i >= 0; i--) {
      if (st[x][i] != st[y][i]) {
        x = st[x][i];
        y = st[y][i];
      }
    }
    return dep[st[x][0]];
  }
} db;
int query(int a1, int a2, int a3) {
  printf("%d %d %d\n", a1, a2, a3);
  fflush(stdout);
  string s;
  cin >> s;
  if (s == "-1") exit(0);
  return s[0] - 'X';
}
int nodecnt;
int id[2010], siz[2010], rt, fa[2010];
bool vis[2010];
vector<int> v[2010];
void addnode(int a, int c, int b) {
  *find(v[a].begin(), v[a].end(), c) = ++nodecnt;
  v[b].push_back(nodecnt);
  *find(v[c].begin(), v[c].end(), a) = nodecnt;
  v[nodecnt].push_back(a);
  v[nodecnt].push_back(b);
  v[nodecnt].push_back(c);
}
int rr = -1, mxsiz[2010];
void dfs(int np, int fath, int totsiz) {
  mxsiz[np] = 0;
  if (v[np].size() == 1) {
    siz[np] = 1;
    id[np] = np;
    return;
  }
  siz[np] = 0;
  for (int i = 0; i < v[np].size(); i++) {
    int x = v[np][i];
    if (x == fath || vis[x]) continue;
    dfs(x, np, totsiz);
    siz[np] += siz[v[np][i]];
    mxsiz[np] = max(mxsiz[np], siz[v[np][i]]);
  }
  mxsiz[np] = max(mxsiz[np], totsiz - siz[np]);
  if (v[np].size() > 1 && (rr == -1 || mxsiz[rr] > mxsiz[np])) rr = np;
}
void relabel(int np, int fath) {
  if (v[np].size() == 1) {
    id[np] = np;
    return;
  }
  relabel(v[np][0], np);
  relabel(v[np][1], np);
  id[np] = id[v[np][0]];
}
void solve(int np, int totsiz, int lstp, int b) {
  if (v[np].size() == 1) {
    addnode(np, v[np][0], b);
    return;
  }
  if (vis[np]) {
    assert(lstp != -1);
    int d = find(v[np].begin(), v[np].end(), lstp) - v[np].begin();
    if (d < 2) {
      ++nodecnt;
      v[np][d] = nodecnt;
      *find(v[lstp].begin(), v[lstp].end(), np) = nodecnt;
      v[nodecnt].push_back(lstp);
      v[nodecnt].push_back(b);
      v[nodecnt].push_back(np);
      v[b].push_back(nodecnt);
    } else {
      ++nodecnt;
      v[np][d] = nodecnt;
      *find(v[lstp].begin(), v[lstp].end(), np) = nodecnt;
      v[nodecnt].push_back(np);
      v[nodecnt].push_back(b);
      v[nodecnt].push_back(lstp);
      v[b].push_back(nodecnt);
    }
    return;
  }
  rr = -1;
  dfs(np, -1, totsiz);
  np = rr;
  vis[np] = 1;
  assert(v[np].size() >= 2);
  int d = query(id[v[np][0]], id[v[np][1]], b);
  if (d == 0) {
    if (v[np].size() == 2) {
      ++nodecnt;
      v[np].push_back(nodecnt);
      v[nodecnt].push_back(np);
      v[b].push_back(nodecnt);
      v[nodecnt].push_back(b);
      return;
    } else
      solve(v[np][2], siz[v[np][2]], np, b);
  } else if (d == 1)
    solve(v[np][1], siz[v[np][1]], np, b);
  else
    solve(v[np][0], siz[v[np][0]], np, b);
}
void getans(int np, int fath) {
  fa[np] = fath;
  for (int i = 0; i < v[np].size(); i++) {
    int x = v[np][i];
    if (x == fath) continue;
    getans(x, np);
  }
}
int main() {
  scanf("%d", &n);
  db.init();
  nodecnt = n + 1;
  v[nodecnt].push_back(1);
  v[nodecnt].push_back(2);
  v[1].push_back(nodecnt);
  v[2].push_back(nodecnt);
  for (int i = 3; i <= n; i++) {
    fill(vis + 1, vis + nodecnt + 1, 0);
    rt = -1;
    for (int j = n + 1; j <= nodecnt; j++) {
      if (v[j].size() == 2) {
        rt = j;
        break;
      }
    }
    relabel(rt, -1);
    solve(rt, i - 1, -1, i);
  }
  rt = -1;
  for (int j = n + 1; j <= nodecnt; j++) {
    if (v[j].size() == 2) {
      rt = j;
      break;
    }
  }
  getans(rt, -1);
  puts("-1");
  for (int i = 1; i <= 2 * n - 1; i++) printf("%d ", fa[i]);
  return 0;
}