Problem: Pavel is going to make a game of his dream. However, he knows that he can't make it on his own so he founded a development company and hired n workers of staff. Now he wants to pick n workers from the staff who will be directly responsible for developing a game.

Each worker has a certain skill level vi. Besides, each worker doesn't want to work with the one whose skill is very different. In other words, the i-th worker won't work with those whose skill is less than li, and with those whose skill is more than ri.

Pavel understands that the game of his dream isn't too hard to develop, so the worker with any skill will be equally useful. That's why he wants to pick a team of the maximum possible size. Help him pick such team.

Input

The first line contains a single integer n (1 ≤ n ≤ 105) — the number of workers Pavel hired.

Each of the following n lines contains three space-separated integers li, vi, ri (1 ≤ li ≤ vi ≤ ri ≤ 3·105) — the minimum skill value of the workers that the i-th worker can work with, the i-th worker's skill and the maximum skill value of the workers that the i-th worker can work with.

Output

In the first line print a single integer m — the number of workers Pavel must pick for developing the game.

In the next line print m space-separated integers — the numbers of the workers in any order.

If there are multiple optimal solutions, print any of them.

Examples

Input

4
2 8 9
1 4 7
3 6 8
5 8 10


Output

3
1 3 4


Input

6
3 5 16
1 6 11
4 8 12
7 9 16
2 10 14
8 13 15


Output

4
1 2 3 5

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
inline long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
char ch[4000010];
inline string get() {
  scanf("%s", ch);
  return string(ch);
}
inline void read(long long *a, long long n) {
  for (long long i = 0; i < n; i++) a[i] = in();
}
template <class blank>
inline void out(blank x) {
  cout << x << "\n";
  exit(0);
}
template <class blank>
inline void smin(blank &a, blank b) {
  a = min(a, b);
}
template <class blank>
inline void smax(blank &a, blank b) {
  a = max(a, b);
}
const long long maxn = 1e5 + 10;
const long long maxm = 2e6 + 10;
const long long maxlg = 21;
const long long base = 29;
const long long mod = 1e9 + 7;
const long long inf = 2e18 + 10;
long long n, l[maxn], r[maxn], x[maxn];
vector<long long> L[3 * maxn], R[3 * maxn];
struct node {
  long long maxi, maxid, lazy;
  node() { maxi = maxid = lazy = 0; }
} stree[12 * maxn], empty;
inline node merge(node a, node b, long long val) {
  node ret;
  ret.maxi = max(a.maxi, b.maxi) + val;
  ret.maxid = a.maxi >= b.maxi ? a.maxid : b.maxid;
  ret.lazy = val;
  return ret;
}
inline void add(long long ql, long long qr, long long val, long long p = 0,
                long long l = 1, long long r = 300000) {
  if (stree[p].maxid == 0) stree[p].maxid = l;
  if (l > qr || r < ql) return;
  if (l >= ql && r <= qr) {
    stree[p].maxi += val, stree[p].lazy += val;
    return;
  }
  long long mid = (l + r) >> 1;
  add(ql, qr, val, 2 * p + 1, l, mid);
  add(ql, qr, val, 2 * p + 2, mid + 1, r);
  stree[p] = merge(stree[2 * p + 1], stree[2 * p + 2], stree[p].lazy);
}
inline node get(long long ql, long long qr, long long p = 0, long long l = 1,
                long long r = 300000) {
  if (stree[p].maxid == 0) stree[p].maxid = l;
  if (l > qr || r < ql) return empty;
  if (l >= ql && r <= qr) {
    return stree[p];
  }
  long long mid = (l + r) >> 1;
  return merge(get(ql, qr, 2 * p + 1, l, mid),
               get(ql, qr, 2 * p + 2, mid + 1, r), stree[p].lazy);
}
long long res = 0, Left, Right;
int32_t main() {
  long long n = in();
  for (long long i = 0; i < n; i++) {
    l[i] = in(), x[i] = in(), r[i] = in();
    L[l[i]].push_back(i), R[x[i]].push_back(i);
  }
  for (long long i = 1; i <= 300000; i++) {
    for (auto id : L[i]) add(x[id], r[id], 1);
    node ret = get(i, 300000);
    if (ret.maxi > res) {
      res = ret.maxi, Left = i, Right = ret.maxid;
    }
    for (auto id : R[i]) add(x[id], r[id], -1);
  }
  cout << res << "\n";
  for (long long i = 0; i < n; i++)
    if (l[i] <= Left && r[i] >= Right && x[i] >= Left && x[i] <= Right)
      cout << i + 1 << " ";
}