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 <class T>
void debug(T a, T b) {
  ;
}
template <class T>
void chmin(T& a, const T& b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T& a, const T& b) {
  if (a < b) a = b;
}
namespace std {
template <class S, class T>
ostream& operator<<(ostream& out, const pair<S, T>& a) {
  out << '(' << a.first << ',' << a.second << ')';
  return out;
}
}  // namespace std
long long int readL() {
  long long int res;
  scanf("%I64d", &res);
  return res;
}
void printL(long long int res) { printf("%I64d", res); }
struct segtree {
  int lazy[1200005];
  pair<int, int> maxi[1200005];
  int n;
  void init(int n_) {
    n = 1;
    while (n < n_) n <<= 1;
    for (int i = 0; i < (n); ++i) maxi[i + n - 1].second = i;
    for (int i = n - 2; i >= 0; --i) maxi[i].second = maxi[i * 2 + 1].second;
  }
  void add(int a, int b, int i, int l, int r, int v) {
    if (a <= l && r <= b) {
      lazy[i] += v;
      maxi[i].first += v;
      return;
    }
    if (b <= l || r <= a) return;
    int md = (l + r) >> 1;
    if (lazy[i]) {
      lazy[i * 2 + 1] += lazy[i];
      lazy[i * 2 + 2] += lazy[i];
      maxi[i * 2 + 1].first += lazy[i];
      maxi[i * 2 + 2].first += lazy[i];
      lazy[i] = 0;
    }
    add(a, b, i * 2 + 1, l, md, v);
    add(a, b, i * 2 + 2, md, r, v);
    maxi[i] = max(maxi[i * 2 + 1], maxi[i * 2 + 2]);
  }
  pair<int, int> query() { return maxi[0]; }
};
segtree seg;
int n;
pair<pair<int, int>, pair<int, int> > eve[200005];
pair<pair<int, int>, int> work[100005];
int main() {
  cin >> n;
  for (int i = 0; i < (n); ++i) {
    int l, v, r;
    scanf("%d%d%d", &l, &v, &r);
    work[i] = make_pair(make_pair(l, r), v);
    eve[i * 2] = make_pair(make_pair(l, 1), make_pair(v, r));
    eve[i * 2 + 1] = make_pair(make_pair(v + 1, -1), make_pair(v, r));
  }
  seg.init(300002);
  int m = n * 2;
  sort(eve, eve + m);
  int res = 0, L, R;
  for (int i = 0; i < (m); ++i) {
    int p = eve[i].first.first;
    int j = i;
    while (j < m && eve[j].first.first == p) {
      ;
      ;
      ;
      ;
      seg.add(eve[j].second.first, eve[j].second.second + 1, 0, 0, seg.n,
              eve[j].first.second);
      ++j;
    }
    pair<int, int> maxi = seg.query();
    ;
    ;
    if (res < maxi.first) {
      res = maxi.first;
      L = p;
      R = maxi.second;
    }
    i = j - 1;
  };
  ;
  ;
  ;
  cout << res << endl;
  for (int i = 0; i < (n); ++i) {
    if (work[i].first.first <= L && L <= work[i].second &&
        work[i].second <= R && R <= work[i].first.second) {
      printf("%d\n", i + 1);
    }
  }
  return 0;
}