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;
void getre() {
  int x = 0;
  printf("%d\n", 1 / x);
}
void gettle() {
  int res = 1;
  while (1) res <<= 1;
  printf("%d\n", res);
}
template <typename T, typename S>
inline bool upmin(T &a, const S &b) {
  return a > b ? a = b, 1 : 0;
}
template <typename T, typename S>
inline bool upmax(T &a, const S &b) {
  return a < b ? a = b, 1 : 0;
}
template <typename N, typename PN>
inline N flo(N a, PN b) {
  return a >= 0 ? a / b : -((-a - 1) / b) - 1;
}
template <typename N, typename PN>
inline N cei(N a, PN b) {
  return a > 0 ? (a - 1) / b + 1 : -(-a / b);
}
template <typename N>
N gcd(N a, N b) {
  return b ? gcd(b, a % b) : a;
}
template <typename N>
inline int sgn(N a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
inline void gn(long long &x) {
  int sg = 1;
  char c;
  while (((c = getchar()) < '0' || c > '9') && c != '-')
    ;
  c == '-' ? (sg = -1, x = 0) : (x = c - '0');
  while ((c = getchar()) >= '0' && c <= '9') x = x * 10 + c - '0';
  x *= sg;
}
inline void gn(int &x) {
  long long t;
  gn(t);
  x = t;
}
inline void gn(unsigned long long &x) {
  long long t;
  gn(t);
  x = t;
}
inline void gn(double &x) {
  double t;
  scanf("%lf", &t);
  x = t;
}
inline void gn(long double &x) {
  double t;
  scanf("%lf", &t);
  x = t;
}
inline void gs(char *s) { scanf("%s", s); }
inline void gc(char &c) {
  while ((c = getchar()) > 126 || c < 33)
    ;
}
inline void pc(char c) { putchar(c); }
inline long long sqr(long long a) { return a * a; }
inline double sqrf(double a) { return a * a; }
const int inf = 0x3f3f3f3f;
const double pi = 3.14159265358979323846264338327950288L;
const double eps = 1e-6;
int n;
map<pair<pair<int, int>, int>, char> note;
char ask(int a, int b, int c) {
  if (a == b) {
    assert(a == 0);
    return 'X';
  }
  assert(a != b && b != c && c != a);
  auto x = make_pair(make_pair(a, b), c);
  if (note.count(x))
    return note[x];
  else {
    printf("%d %d %d\n", a, b, c);
    fflush(stdout);
    char c;
    gc(c);
    note[x] = c;
    return c;
  }
}
int ndtot;
int pr[2111];
int ch1[2222], ch2[2222];
vector<int> chd[2222];
int off[2111];
void rebuild() {
  for (int i = (1), _ed = (ndtot + 1); i < _ed; i++) off[i] = 0;
  for (int i = (1), _ed = (ndtot + 1); i < _ed; i++) chd[i].clear();
  for (int i = (1), _ed = (ndtot + 1); i < _ed; i++)
    if (pr[i]) chd[pr[i]].push_back(i);
}
int rt;
int u;
int sz[2222], maa[2222];
int lis[2222];
int ltot;
void dfs(int u) {
  sz[u] = 1;
  maa[u] = 0;
  lis[++ltot] = u;
  for (int j = (0), _ed = (((int)(chd[u]).size())); j < _ed; j++) {
    int v = chd[u][j];
    if (off[v]) continue;
    dfs(v);
    upmax(maa[u], sz[v]);
    sz[u] += sz[v];
  }
}
int work(int rt) {
  ltot = 0;
  dfs(rt);
  int totsz = sz[rt];
  if (totsz == 1) return rt;
  int cen = 0;
  for (int i = (1), _ed = (ltot + 1); i < _ed; i++) {
    int u = lis[i];
    if ((totsz - sz[u]) * 2 <= totsz && maa[u] && maa[u] * 2 <= totsz) {
      cen = u;
      break;
    }
  }
  assert(cen);
  assert(cen > n);
  char ret;
  ret = ask(ch1[cen], ch2[cen], u);
  if (ret == 'X') {
    off[chd[cen][0]] = off[chd[cen][1]] = 1;
    return work(rt);
  } else {
    int son1, son2;
    if (ch1[chd[cen][0]] == ch2[cen] || ch2[chd[cen][0]] == ch2[cen] ||
        chd[cen][0] == ch2[cen]) {
      son2 = chd[cen][0];
      son1 = chd[cen][1];
    } else {
      son1 = chd[cen][0];
      son2 = chd[cen][1];
    }
    if (ret == 'Y') {
      return work(son2);
    } else
      return work(son1);
  }
}
int main() {
  gn(n);
  ndtot = n;
  char ret = ask(1, 2, 3);
  int arr[4];
  if (ret == 'X')
    arr[1] = 1, arr[2] = 2, arr[3] = 3;
  else if (ret == 'Y')
    arr[1] = 2, arr[2] = 3, arr[3] = 1;
  else
    arr[1] = 3, arr[2] = 1, arr[3] = 2;
  int x = ++ndtot;
  int y = ++ndtot;
  pr[arr[1]] = pr[arr[2]] = x;
  ch1[x] = arr[1];
  ch2[x] = arr[2];
  pr[x] = pr[arr[3]] = y;
  ch1[y] = arr[1];
  ch2[y] = arr[3];
  rt = y;
  for (u = 4; u <= n; u++) {
    rebuild();
    for (int i = (1), _ed = (ndtot + 1); i < _ed; i++)
      ;
    ;
    int t = work(rt);
    int x = ++ndtot;
    if (pr[t] == 0) {
      ch1[x] = ch1[t];
      rt = x;
    } else {
      if (t <= n)
        ch1[x] = t;
      else {
        if (ch1[pr[t]] == ch1[t] || ch2[pr[t]] == ch1[t])
          ch1[x] = ch1[t];
        else
          ch1[x] = ch2[t];
      }
    }
    ch2[x] = u;
    pr[u] = x;
    pr[x] = pr[t];
    pr[t] = x;
  }
  printf("-1\n");
  for (int i = (1), _ed = (ndtot + 1); i < _ed; i++) {
    if (pr[i] == 0)
      printf("-1 ");
    else
      printf("%d ", pr[i]);
  }
  return 0;
}