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;
const int mxn = 1e5 + 10;
struct tree {
  int l, r, val, tag, pos;
} t[mxn << 4];
struct xian {
  int x1, x2, val, y;
} s[4 * mxn];
int l0[mxn], r0[mxn], v0[mxn], n, cnt, ans, ansx, ansy, x[4 * mxn];
void build(int ro, int l, int r) {
  t[ro].l = l;
  t[ro].r = r;
  if (l == r) {
    t[ro].pos = x[l];
    return;
  }
  int mid = (l + r) >> 1;
  build(ro << 1, l, mid);
  build(ro << 1 | 1, mid + 1, r);
  t[ro].pos = t[ro << 1].pos;
}
bool cmp(xian a, xian b) { return a.y == b.y ? a.val > b.val : a.y < b.y; }
void pushdown(int ro) {
  t[ro << 1].val += t[ro].tag;
  t[ro << 1].tag += t[ro].tag;
  t[ro << 1 | 1].val += t[ro].tag;
  t[ro << 1 | 1].tag += t[ro].tag;
  t[ro].tag = 0;
}
void pushup(int ro) {
  if (t[ro << 1].val > t[ro << 1 | 1].val) {
    t[ro].val = t[ro << 1].val;
    t[ro].pos = t[ro << 1].pos;
  } else {
    t[ro].val = t[ro << 1 | 1].val;
    t[ro].pos = t[ro << 1 | 1].pos;
  }
}
void updat(int ro, int l, int r, int val) {
  pushdown(ro);
  if (x[t[ro].l] >= l && x[t[ro].r] <= r) {
    t[ro].val += val;
    t[ro].tag += val;
    return;
  }
  int mid = (t[ro].l + t[ro].r) >> 1;
  if (l <= x[mid]) updat(ro << 1, l, r, val);
  if (r > x[mid]) updat(ro << 1 | 1, l, r, val);
  pushup(ro);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d%d", &l0[i], &v0[i], &r0[i]);
    s[++cnt].y = l0[i], s[cnt].x1 = v0[i], s[cnt].x2 = r0[i], s[cnt].val = 1;
    x[cnt] = v0[i];
    s[++cnt].y = v0[i], s[cnt].x1 = v0[i], s[cnt].x2 = r0[i], s[cnt].val = -1;
    x[cnt] = r0[i];
  }
  sort(x + 1, x + cnt + 1);
  int tot = unique(x + 1, x + cnt + 1) - x - 1;
  build(1, 1, tot);
  sort(s + 1, s + cnt + 1, cmp);
  for (int i = 1; i <= cnt; i++) {
    updat(1, s[i].x1, s[i].x2, s[i].val);
    if (t[1].val > ans) {
      ans = t[1].val;
      ansx = t[1].pos;
      ansy = s[i].y;
    }
  }
  printf("%d\n", ans);
  for (int i = 1; i <= n; i++) {
    if (l0[i] <= ansy && v0[i] >= ansy && v0[i] <= ansx && r0[i] >= ansx)
      printf("%d ", i);
  }
  return 0;
}