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;
int mini(int a, int b) {
  if (a < b) return a;
  return b;
}
int maxi(int a, int b) {
  if (a > b) return a;
  return b;
}
int n, L[300100], V[300100], R[300100];
struct event {
  int type, val, ind;
  event() {}
  event(int _t, int _val, int _ind) { type = _t, val = _val, ind = _ind; }
};
event E[2 * 300100];
int ce = 0;
bool comp(event a, event b) {
  if (a.val == b.val) return a.type < b.type;
  return a.val < b.val;
}
struct tree {
  int mx, ind, rem;
};
tree T[4 * 300100];
void init(int node, int b, int e);
void update(int node, int b, int e, int k, int l, int add);
int main() {
  int i, j, k, l, test, t = 1;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d %d %d", &L[i], &V[i], &R[i]);
    E[ce++] = event(1, L[i], i);
    E[ce++] = event(2, V[i], i);
  }
  sort(E, E + ce, comp);
  init(1, 1, 300000);
  int ans = 0, ansl, ansr;
  for (i = 0; i < ce; i++) {
    event curr = E[i];
    int piv = E[i].ind;
    k = V[piv], l = R[piv];
    if (curr.type == 1) {
      update(1, 1, 300000, k, l, 1);
      if (T[1].mx > ans) {
        ans = T[1].mx;
        ansl = E[i].val;
        ansr = T[1].ind;
      }
    } else {
      update(1, 1, 300000, k, l, -1);
    }
  }
  printf("%d\n", ans);
  bool space = 0;
  for (i = 1; i <= n; i++) {
    if (L[i] <= ansl && ansl <= V[i] && V[i] <= ansr && ansr <= R[i]) {
      if (space) printf(" ");
      space = 1;
      printf("%d", i);
    }
  }
  puts("");
  return 0;
}
void update(int node, int b, int e, int k, int l, int rem) {
  if (b == e) {
    T[node].ind = b;
    T[node].mx += rem;
    T[node].rem = 0;
    return;
  }
  if (b == k && e == l) {
    T[node].rem += rem;
    T[node].mx += rem;
    return;
  }
  int left, right, mid;
  left = node << 1, right = left + 1, mid = (b + e) / 2;
  if (T[node].rem) {
    update(left, b, mid, b, mid, T[node].rem);
    update(right, mid + 1, e, mid + 1, e, T[node].rem);
    T[node].rem = 0;
  }
  if (l <= mid)
    update(left, b, mid, k, l, rem);
  else if (k > mid)
    update(right, mid + 1, e, k, l, rem);
  else {
    update(left, b, mid, k, mid, rem);
    update(right, mid + 1, e, mid + 1, l, rem);
  }
  if (T[left].mx > T[right].mx) {
    T[node].mx = T[left].mx;
    T[node].ind = T[left].ind;
  } else {
    T[node].mx = T[right].mx;
    T[node].ind = T[right].ind;
  }
}
void init(int node, int b, int e) {
  if (b == e) {
    T[node].ind = b;
    T[node].mx = 0;
    T[node].rem = 0;
    return;
  }
  int left, right, mid;
  left = node << 1, right = left + 1, mid = (b + e) / 2;
  init(left, b, mid);
  init(right, mid + 1, e);
  T[node] = T[left];
}