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>
template <class T>
inline T read(const T sample) {
  T x = 0;
  int f = 1;
  char s;
  while ((s = getchar()) > '9' || s < '0')
    if (s == '-') f = -1;
  while (s >= '0' && s <= '9')
    x = (x << 1) + (x << 3) + (s ^ 48), s = getchar();
  return x * f;
}
template <class T>
inline void write(const T x) {
  if (x < 0) return (void)(putchar('-'), write(-x));
  if (x > 9) write(x / 10);
  putchar(x % 10 ^ 48);
}
template <class T>
inline T Max(const T x, const T y) {
  return x > y ? x : y;
}
template <class T>
inline T Min(const T x, const T y) {
  return x < y ? x : y;
}
template <class T>
inline T fab(const T x) {
  return x > 0 ? x : -x;
}
template <class T>
inline T Gcd(const T x, const T y) {
  return y ? Gcd(y, x % y) : x;
}
using namespace std;
const int N = 1e5 + 5, lim = 3e5;
int n, cnt, x[N], y[N], z[N], t[lim << 2], pos[lim << 2], la[lim << 2], ans;
struct node {
  int l, r, k;
  bool op;
} s[N << 1];
bool cmp(node x, node y) {
  if (x.k ^ y.k) return x.k < y.k;
  return x.op < y.op;
}
void build(int o, int l, int r) {
  if (l == r) {
    pos[o] = l;
    return;
  }
  int mid = l + r >> 1;
  build(o << 1, l, mid);
  build(o << 1 | 1, mid + 1, r);
  pos[o] = pos[o << 1];
}
void pushDown(int o) {
  if (!la[o]) return;
  la[o << 1] += la[o], la[o << 1 | 1] += la[o];
  t[o << 1] += la[o], t[o << 1 | 1] += la[o];
  la[o] = 0;
}
void pushUp(int o) {
  if (t[o << 1] > t[o << 1 | 1])
    t[o] = t[o << 1], pos[o] = pos[o << 1];
  else
    t[o] = t[o << 1 | 1], pos[o] = pos[o << 1 | 1];
}
void modify(int o, int l, int r, int L, int R, int k) {
  if (l > R || r < L) return;
  if (l >= L && r <= R) {
    t[o] += k, la[o] += k;
    return;
  }
  int mid = l + r >> 1;
  pushDown(o);
  modify(o << 1, l, mid, L, R, k);
  modify(o << 1 | 1, mid + 1, r, L, R, k);
  pushUp(o);
}
int main() {
  int L, R;
  n = read(9);
  for (register signed i = (1), _end = (n); i <= _end; ++i) {
    x[i] = read(9), y[i] = read(9), z[i] = read(9);
    s[++cnt] = (node){y[i], z[i], x[i], 0};
    s[++cnt] = (node){y[i], z[i], y[i], 1};
  }
  sort(s + 1, s + cnt + 1, cmp);
  build(1, 1, lim);
  for (register signed i = (1), _end = (cnt); i <= _end; ++i) {
    modify(1, 1, lim, s[i].l, s[i].r, s[i].op ? -1 : 1);
    if (t[1] > ans) {
      ans = t[1];
      L = s[i].k, R = pos[1];
    }
  }
  write(ans), putchar('\n');
  for (register signed i = (1), _end = (n); i <= _end; ++i)
    if (x[i] <= L && L <= y[i] && y[i] <= R && R <= z[i])
      write(i), putchar(' ');
  puts("");
  return 0;
}