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;
template <typename T, typename U>
inline void smin(T &a, const U &b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, const U &b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &first) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), first = 0; c >= '0' && c <= '9';
       c = getchar())
    first = (first << 1) + (first << 3) + c - '0';
  if (sg) first = -first;
}
template <class T1, class T2>
inline void gn(T1 &x1, T2 &x2) {
  gn(x1), gn(x2);
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
int mx[300300 << 2], up[300300 << 2];
void update(int u, int first) {
  mx[u] += first;
  up[u] += first;
}
void down(int u) {
  if (up[u]) {
    update((u << 1), up[u]);
    update(((u << 1) | 1), up[u]);
    up[u] = 0;
  }
}
void update(int u, int L, int R, int l, int r, int first) {
  if (r <= L || R <= l) return;
  if (l <= L && R <= r) {
    update(u, first);
    return;
  }
  down(u);
  update((u << 1), L, (L + R >> 1), l, r, first);
  update(((u << 1) | 1), (L + R >> 1), R, l, r, first);
  mx[u] = max(mx[(u << 1)], mx[((u << 1) | 1)]);
}
pair<int, int> calc(int u, int L, int R) {
  if (L + 1 == R) return pair<int, int>(mx[u], L);
  down(u);
  if (mx[(u << 1)] > mx[((u << 1) | 1)]) return calc((u << 1), L, (L + R >> 1));
  return calc(((u << 1) | 1), (L + R >> 1), R);
}
int L[300300], V[300300], R[300300];
vector<pair<int, int> > vec[300300];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    gn(L[i], V[i]), gn(R[i]);
    vec[L[i]].push_back(pair<int, int>(V[i], R[i]));
    vec[V[i] + 1].push_back(pair<int, int>(-V[i], R[i]));
  }
  int ans = 0, st, ed;
  for (int i = 1; i < 300300; i++) {
    for (pair<int, int> p : vec[i]) {
      if (p.first < 0)
        update(1, 1, 300300, -p.first, p.second + 1, -1);
      else
        update(1, 1, 300300, p.first, p.second + 1, 1);
    }
    pair<int, int> res = calc(1, 1, 300300);
    if (res.first > ans) {
      ans = res.first;
      st = i, ed = res.second;
    }
  }
  printf("%d\n", ans);
  for (int i = 1; i <= n; i++) {
    if (V[i] >= st && V[i] <= ed && L[i] <= st && R[i] >= ed) printf("%d ", i);
  }
  return 0;
}