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;
ostream& operator<<(ostream& os, vector<int>& x) {
  for (int i = 0; i < x.size(); i++) os << x[i] << ' ';
  return os;
}
ostream& operator<<(ostream& os, pair<int, int> x) {
  cout << x.first << ' ' << x.second << ' ';
  return os;
}
struct data {
  int x, y1, y2, type;
  data(int _x, int _y1, int _y2, int _type) {
    x = _x;
    y1 = _y1;
    y2 = _y2;
    type = _type;
  }
};
bool operator<(data x, data y) {
  if (x.x == y.x) return x.type > y.type;
  return x.x < y.x;
}
int n;
pair<pair<int, int>, int> a[300005];
vector<data> query;
pair<int, int> f[4 * 300005];
int lazy[4 * 300005];
void do_lazy(int k, int l, int r) {
  if (!lazy[k]) return;
  f[k].first += lazy[k];
  if (l != r) {
    lazy[k * 2] += lazy[k];
    lazy[k * 2 + 1] += lazy[k];
  }
  lazy[k] = 0;
}
pair<int, int> get(int k, int l, int r, int L, int R) {
  do_lazy(k, l, r);
  if (r < L || R < l) return make_pair(0, 0);
  if (L <= l && r <= R) return f[k];
  int y = (l + r) / 2;
  return max(get(k * 2, l, y, L, R), get(k * 2 + 1, y + 1, r, L, R));
}
void update(int k, int l, int r, int L, int R, int val) {
  do_lazy(k, l, r);
  if (r < L || R < l) return;
  if (L <= l && r <= R) {
    f[k].first += val;
    if (l != r) {
      lazy[k * 2] += val;
      lazy[k * 2 + 1] += val;
    }
    return;
  }
  int y = (l + r) / 2;
  update(k * 2, l, y, L, R, val);
  update(k * 2 + 1, y + 1, r, L, R, val);
  f[k] = max(f[k * 2], f[k * 2 + 1]);
}
void init(int k, int l, int r) {
  if (l == r) {
    f[k].first = 0;
    f[k].second = l;
    return;
  }
  int y = (l + r) / 2;
  init(k * 2, l, y);
  init(k * 2 + 1, y + 1, r);
  f[k] = max(f[k * 2], f[k * 2 + 1]);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x, y, z;
    cin >> x >> y >> z;
    a[i].first.first = x;
    a[i].first.second = z;
    a[i].second = y;
    query.push_back(data(x, y, z, 1));
    query.push_back(data(y + 1, y, z, -1));
  }
  sort(query.begin(), query.end());
  int lim = 3e5;
  init(1, 1, lim);
  int ans = 0;
  pair<int, int> ans_pos;
  int pre = 0;
  for (int i = 0; i < query.size(); i++) {
    if (query[i].x != pre) {
      if (f[1].first > ans) {
        ans = f[1].first;
        ans_pos = make_pair(pre, f[1].second);
      }
      pre = query[i].x;
    }
    update(1, 1, lim, query[i].y1, query[i].y2, query[i].type);
  }
  cout << ans << '\n';
  for (int i = 1; i <= n; i++) {
    if (a[i].first.first <= ans_pos.first &&
        a[i].first.second >= ans_pos.second && a[i].second >= ans_pos.first &&
        a[i].second <= ans_pos.second) {
      cout << i << ' ';
    }
  }
}