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 read() {
  long long x = 0, f = 1;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f *= -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = (x << 1) + (x << 3) + s - '0';
    s = getchar();
  }
  return x * f;
}
struct itn {
  int l, v, r, id;
} a[100005];
struct bol {
  bool operator()(itn x, itn y) { return x.r > y.r; }
};
inline bool cmp(itn x, itn y) { return x.v < y.v; }
int n = read(), ans = 0, L, R, m, f[300005 * 3], ml[300005 * 3], lz[300005 * 3],
    p;
inline void add(int l, int r, int d) {
  for (l = p + l - 1, r = p + r + 1; (l ^ 1) != r;) {
    if ((l & 1) ^ 1) f[l ^ 1] += d, lz[l ^ 1] += d;
    if (r & 1) f[r ^ 1] += d, lz[r ^ 1] += d;
    l >>= 1, r >>= 1;
    if (f[l << 1] >= f[l << 1 | 1])
      f[l] = f[l << 1] + lz[l], ml[l] = ml[l << 1];
    else
      f[l] = f[l << 1 | 1] + lz[l], ml[l] = ml[l << 1 | 1];
    if (f[r << 1] >= f[r << 1 | 1])
      f[r] = f[r << 1] + lz[r], ml[r] = ml[r << 1];
    else
      f[r] = f[r << 1 | 1] + lz[r], ml[r] = ml[r << 1 | 1];
  }
  for (l >>= 1; l > 0; l >>= 1) {
    if (f[l << 1] >= f[l << 1 | 1])
      f[l] = f[l << 1] + lz[l], ml[l] = ml[l << 1];
    else
      f[l] = f[l << 1 | 1] + lz[l], ml[l] = ml[l << 1 | 1];
  }
}
int main() {
  for (int i = 1; i <= n; i++)
    a[i].l = read(), a[i].v = read(), a[i].r = read(), a[i].id = i,
    m = max(m, a[i].r);
  sort(a + 1, a + 1 + n, cmp);
  for (p = 1; p <= m + 1; p <<= 1)
    ;
  for (int i = p + 1; i <= p + m; i++) ml[i] = i - p;
  for (int i = p - 1; i > 0; i--) ml[i] = ml[i << 1];
  priority_queue<itn, vector<itn>, bol> s;
  for (int r = 1, d = 0; r <= m; r++) {
    while (d < n && a[d + 1].v <= r) d++, add(a[d].l, a[d].v, 1), s.push(a[d]);
    while (!s.empty() && s.top().r < r) add(s.top().l, s.top().v, -1), s.pop();
    if (f[1] > ans) ans = f[1], L = ml[1], R = r;
  }
  printf("%d\n", ans, L, R);
  for (int i = 1; i <= n; i++)
    if (a[i].l <= L && a[i].r >= R && a[i].v >= L && a[i].v <= R)
      printf("%d ", a[i].id);
  putchar('\n');
  return 0;
}