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>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int M = 3e5 + 5, INF = 0x3f3f3f3f, mod = 1e9 + 7;
vector<pair<int, int> > A[M];
vector<int> B[M];
struct seg_tree {
  struct node {
    int L, R, maxx, pos, add;
    node() { maxx = pos = add = 0; }
    void set(int x) {
      add += x;
      maxx += x;
    }
  } tree[M * 4];
  void down(int p) {
    if (tree[p].add) {
      tree[p * 2].set(tree[p].add);
      tree[p * 2 + 1].set(tree[p].add);
      tree[p].add = 0;
    }
  }
  void up(int p) {
    if (tree[p * 2].maxx > tree[p * 2 + 1].maxx) {
      tree[p].maxx = tree[p * 2].maxx;
      tree[p].pos = tree[p * 2].pos;
    } else {
      tree[p].maxx = tree[p * 2 + 1].maxx;
      tree[p].pos = tree[p * 2 + 1].pos;
    }
  }
  void build(int x, int y, int p) {
    tree[p].L = x;
    tree[p].R = y;
    if (x == y) {
      tree[p].pos = x;
      return;
    }
    int mid = (x + y) >> 1;
    build(x, mid, p * 2);
    build(mid + 1, y, p * 2 + 1);
    up(p);
  }
  void update(int x, int y, int z, int p) {
    if (tree[p].L == x && tree[p].R == y) {
      tree[p].set(z);
      return;
    }
    down(p);
    int mid = (tree[p].L + tree[p].R) >> 1;
    if (y <= mid)
      update(x, y, z, p * 2);
    else if (x > mid)
      update(x, y, z, p * 2 + 1);
    else
      update(x, mid, z, p * 2), update(mid + 1, y, z, p * 2 + 1);
    up(p);
  }
} tree;
int L[M], V[M], R[M];
int main() {
  int n;
  scanf("%d", &n);
  for (int j = 1; j <= n; j++) {
    int l, v, r;
    scanf("%d%d%d", &l, &v, &r);
    A[l].push_back({v, r});
    B[v].push_back(r);
    L[j] = l;
    V[j] = v;
    R[j] = r;
  }
  tree.build(1, M - 5, 1);
  int res = 0, l = 0, r = 0;
  for (int j = 1; j <= M - 5; j++) {
    for (auto x : A[j]) tree.update(x.first, x.second, 1, 1);
    if (tree.tree[1].maxx > res) {
      res = tree.tree[1].maxx;
      l = j;
      r = tree.tree[1].pos;
    }
    for (auto x : B[j]) tree.update(j, x, -1, 1);
  }
  printf("%d\n", res);
  for (int j = 1; j <= n; j++) {
    if (l >= L[j] && l <= V[j] && r >= V[j] && r <= R[j]) printf("%d ", j);
  }
  return 0;
}