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;
template <class T>
inline void rd(T &x) {
  char ch;
  x = 0;
  bool fl = false;
  while (!isdigit(ch = getchar())) (ch == '-') && (fl = true);
  for (x = (ch ^ '0'); isdigit(ch = getchar()); x = x * 10 + (ch ^ '0'))
    ;
  (fl == true) && (x = -x);
}
template <class T>
inline void output(T x) {
  if (x / 10) output(x / 10);
  putchar(x % 10 + '0');
}
template <class T>
inline void ot(T x) {
  if (x < 0) putchar('-'), x = -x;
  output(x);
  putchar(' ');
}
template <class T>
inline void prt(T a[], int st, int nd) {
  for (register int i = st; i <= nd; ++i) ot(a[i]);
  putchar('\n');
}
namespace Modulo {
const int mod = 998244353;
int ad(int x, int y) { return (x + y) >= mod ? x + y - mod : x + y; }
void inc(int &x, int y) { x = ad(x, y); }
int mul(int x, int y) { return (long long)x * y % mod; }
void inc2(int &x, int y) { x = mul(x, y); }
int qm(int x, int y = mod - 2) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = mul(x, ret);
    x = mul(x, x);
    y >>= 1;
  }
  return ret;
}
}  // namespace Modulo
namespace Miracle {
const int N = 2005;
int n;
char s[233];
int fa[N], ch[N][2], has[N][2];
int tot;
int ask(int a, int b, int c) {
  printf("%d %d %d\n", a, b, c);
  fflush(stdout);
  scanf("%s", s + 1);
  return (s[1] - 'X');
}
bool vis[N];
int rt, sz[N];
int nowsz;
void dfs(int x, int od) {
  if (!x) return;
  sz[x] = 1;
  int mx = 0, now;
  if (!vis[fa[x]] && fa[x] != od)
    dfs(fa[x], x), mx = max(mx, sz[fa[x]]), sz[x] += sz[fa[x]];
  if (!vis[ch[x][0]] && ch[x][0] != od)
    dfs(ch[x][0], x), mx = max(mx, sz[ch[x][0]]), sz[x] += sz[ch[x][0]];
  if (!vis[ch[x][1]] && ch[x][1] != od)
    dfs(ch[x][1], x), mx = max(mx, sz[ch[x][1]]), sz[x] += sz[ch[x][1]];
  if ((ch[x][0] || ch[x][1]) && (max(mx, nowsz - sz[x]) <= nowsz / 2)) rt = x;
}
void dfs2(int x, int od) {
  if (!x) return;
  sz[x] = 1;
  if (!vis[fa[x]] && fa[x] != od) dfs2(fa[x], x), sz[x] += sz[fa[x]];
  if (!vis[ch[x][0]] && ch[x][0] != od)
    dfs2(ch[x][0], x), sz[x] += sz[ch[x][0]];
  if (!vis[ch[x][1]] && ch[x][1] != od)
    dfs2(ch[x][1], x), sz[x] += sz[ch[x][1]];
}
void fin(int x, int id) {
  if (!ch[x][0] && !ch[x][1]) {
    ++tot;
    int d = ch[fa[x]][1] == x;
    ch[tot][0] = x;
    ch[tot][1] = id;
    fa[tot] = fa[x];
    ch[fa[x]][d] = tot;
    fa[x] = tot;
    fa[id] = tot;
    has[tot][0] = x;
    has[tot][1] = id;
    return;
  }
  rt = 0;
  dfs(x, 0);
  x = rt;
  dfs2(rt, 0);
  int bc = ask(has[rt][0], has[rt][1], id);
  vis[rt] = 1;
  if (bc == 0) {
    if (fa[x]) {
      if (vis[fa[x]]) {
        int y = fa[x];
        int d = ch[y][1] == x;
        ch[y][d] = ++tot;
        fa[tot] = y;
        ch[tot][d] = x;
        fa[x] = tot;
        ch[tot][d ^ 1] = id;
        fa[id] = tot;
        has[tot][d] = has[x][0];
        has[tot][d ^ 1] = id;
      } else {
        nowsz = sz[fa[x]];
        fin(fa[x], id);
      }
    } else {
      fa[x] = ++tot;
      ch[tot][0] = x;
      ch[tot][1] = id;
      has[tot][0] = has[x][0];
      has[tot][1] = id;
      fa[id] = tot;
    }
  } else {
    int p;
    if (bc == 1)
      p = 1;
    else
      p = 0;
    if (ch[x][p]) {
      int z = ch[x][p];
      if (vis[z]) {
        ++tot;
        ch[x][p] = tot;
        fa[tot] = x;
        ch[tot][p] = z;
        fa[z] = tot;
        ch[tot][p ^ 1] = id;
        fa[id] = tot;
        has[tot][p ^ 1] = id;
        has[tot][p] = has[z][0];
      } else {
        nowsz = sz[z];
        fin(z, id);
      }
    } else {
      assert(-1 > 0);
    }
  }
}
int main() {
  rd(n);
  tot = n;
  ++tot;
  has[tot][0] = ch[tot][0] = 1;
  fa[1] = tot;
  has[tot][1] = ch[tot][1] = 2;
  fa[2] = tot;
  for (register int i = 3; i <= n; ++i) {
    memset(vis, 0, sizeof vis);
    memset(sz, 0, sizeof sz);
    nowsz = 2 * (i - 1) - 1;
    fin(tot, i);
  }
  printf("-1\n");
  for (register int i = 1; i <= tot; ++i) {
    if (!fa[i]) fa[i] = -1;
    ot(fa[i]);
  }
  return 0;
}
}  // namespace Miracle
signed main() {
  Miracle::main();
  return 0;
}