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 JAVA):

Solution:
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.sql.Time;
import java.util.*;

import java.math.BigInteger;

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;


public class Main{

    void run(){
        Locale.setDefault(Locale.US);
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
//        boolean oj = true;
        try{
            if( oj ){
                sc  = new FastScanner( new InputStreamReader(System.in  ) );
                out = new PrintWriter(   new OutputStreamWriter(System.out) );
            } else{
                sc  = new FastScanner(new FileReader("in.txt") );
//                sc  = new FastScanner(new FileReader("D:\\JavaOlymp\\FatalError\\output.txt") );
                out = new PrintWriter(   new FileWriter("out.txt") );
            }
        } catch (Exception e) {
            System.exit(-1);
        }
        long tB = System.currentTimeMillis();
        solve();
        if( !oj ) System.err.println( "Time: " + (System.currentTimeMillis()-tB)/1e3 );
        out.flush();
    }


    class FastScanner{
        BufferedReader br;
        StringTokenizer st = new StringTokenizer("");
        FastScanner( InputStreamReader a ){
            br = new BufferedReader(a);
        }
        FastScanner( FileReader a ){
            br = new BufferedReader(a);
        }
        String next(){
            while( !st.hasMoreTokens() )
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    return null;
                }
            return st.nextToken();
        }
        String readLine(){
            try {
                return br.readLine();
            } catch (Exception e) {
                return null;
            }
        }
        int nextInt(){ return Integer.parseInt(next()); }
        long nextLong(){ return Long.parseLong(next()); }
    }

    FastScanner sc;
    PrintWriter out;



    public static void main(String[] args){
        new Main().run();
//        new Thread( null, new Runnable() {
//            @Override
//            public void run() {
//                new Main().run();
//            }
//            }, "LOL", 256L * 1024 * 1024 / 2 ).run();
//        }, "LOL", 2000 * 1024 * 1024 ).run();
    }



    void TLE(){ for(;;); }

    void MLE(){
        int[][] adj = new int[1024*1024][];
        for( int i = 0; i < adj.length; ++i )
            adj[i] = new int[1024*1024];
    }

    void exit( int val ){
        out.flush();
        System.exit(val);
    }
    //////////////////////////////////////////////////////////////////////////////////////////

    int maxV = (int)3e5;
    int n;
    int[] l, v, r;
    int[] tree, add, bestPos;
    int getMax_pos;
    PriorityQueue<Integer> ordR = new PriorityQueue<>(1,new Comparator<Integer>() {
        @Override
        public int compare(Integer a, Integer b) {
            return Integer.compare(r[a],r[b]);
        }
    });
    PriorityQueue<Integer> ordV = new PriorityQueue<>(1,new Comparator<Integer>() {
        @Override
        public int compare(Integer a, Integer b) {
            return Integer.compare(v[a],v[b]);
        }
    });


    void push( int v){
        tree[v]    += add[v];
        add[2*v  ] += add[v];
        add[2*v+1] += add[v];
        add[v] = 0;
    }

    int getMax( int pos ){
        return getMax( pos, 1,0,maxV );
    }

    int getMax( int pos, int v, int tl, int tr ){
        if( pos==tr ){
            getMax_pos = bestPos[v];
            return tree[v] + add[v];
        }
        else{
            push(v);

            int tm = (tl + tr)/2;
            if( pos <= tm ){
                return getMax(pos,2*v,tl,tm);
            }
            else{
                int a = tree[2*v] + add[2*v];
                int a_pos = bestPos[2*v];
                int b = getMax( pos, 2*v+1, tm+1, tr);
                int b_pos = getMax_pos;
                getMax_pos = a>=b? a_pos : b_pos;
                return max(a,b);
            }
        }
    }

    void add(int l, int r, int add) {
        add(l,r,add, 1,0,maxV);
    }

    void add( int l, int r, int addSeg, int v, int tl, int tr ){
        if( l > r ) return;

        if( l == tl && r == tr ){
            add[v] += addSeg;
        }
        else{
            push(v);

            int tm = (tl + tr) / 2;
            add(           l, min(r,tm), addSeg, 2*v  , tl  , tm );
            add( max(l,tm+1),         r, addSeg, 2*v+1, tm+1, tr );

            int a = tree[2*v  ] + add[2*v  ];
            int b = tree[2*v+1] + add[2*v+1];
            tree[v] = max( a, b );
            bestPos[v] = a >= b? bestPos[2*v] : bestPos[2*v+1];
        }
    }

    void build( int v, int tl, int tr ){
        if( tl == tr )
            bestPos[v] = tl;
        else{
            int tm = (tl + tr) / 2;
            build( 2*v  , tl  , tm );
            build( 2*v+1, tm+1, tr );
            bestPos[v] = bestPos[2*v];
        }
    }


    void solve(){
        n = sc.nextInt();
        l = new int[n];
        v = new int[n];
        r = new int[n];
        maxV = 0;
        for( int i = 0; i < n; ++i ){
            l[i] = sc.nextInt();
            v[i] = sc.nextInt();
            r[i] = sc.nextInt();
            maxV = max(maxV,r[i]);
            ordR.add(i);
            ordV.add(i);
        }

        int ans = 0, vl=-1, vr=-1;
        tree    = new int[4*(maxV+1)];
        add     = new int[4*(maxV+1)];
        bestPos = new int[4*(maxV+1)];
        build(1, 0, maxV);
        for( int i = 0; i <= maxV; ++i ){
            while( !ordV.isEmpty() && v[ordV.peek()]==i ){
                int id = ordV.poll();
                add( l[id], v[id], 1 );
            }
            int cntSeg = getMax(i);
//            out.printf( "%3d) %3d\n", i, cntSeg );
            if( ans < cntSeg ){
                ans = cntSeg;
                vl = getMax_pos;
                vr = i;
            }

            while( !ordR.isEmpty() && r[ordR.peek()]==i ){
                int id = ordR.poll();
                add( l[id], v[id], -1 );
            }
        }

        out.println( ans );
        for( int i = 0; i < n; ++i ){
            if( l[i]<=vl && vl<=v[i] && v[i]<=vr && vr<=r[i] ){
//            if( vl<=v[i] && v[i]<=vr ){
                out.print( " " + (i+1) );
            }
        }
        out.println();
    }




}