In IOI Park, events will be held soon. The events are numbered from to . The -th event will start at time and finish at time . Here and are integers.
JOI-kun will attend exactly events among them. It is forbidden to enter an event after it starts, or to leave an event before it finishes. We ignore the time to move between the locations of events.
JOI-kun wants to attend events with small indices. More precisely, let () be the indices of the events JOI-kun will attend. Then should be the smallest possible sequence in lexicographic order. Here, a sequence is smaller than another sequence in lexicographic order iff there exists () satisfying both " for every " and "."
Write a program which, given the information of the events and the number of events JOI-kun will attend, determines whether JOI-kun will be able to attend events or not. If it is possible for JOI-kun to attend events, the program should calculate the events JOI-kun will attend.
Input Specification
Read the following data from the standard input. Given values are all integers.
Output Specification
If JOI-kun will not be able to attend events, output one line containing -1
to the standard output.
If JOI-kun will be able to attend events, output lines to the standard output. Let () be the indices of the events JOI-kun will attend. The -th line of output should contain . Here should be the smallest possible sequence in lexicographic order.
Constraints
- .
- .
- .
Subtasks
- (7 points) .
- (1 point) .
- (31 points) .
- (61 points) No additional constraints.
Sample Input 1
5 4
1 3
2 5
8 9
6 8
10 15
Sample Output 1
1
3
4
5
Explanation for Sample 1
There are 2 ways for JOI-kun to attend exactly 4 events.
- JOI-kun will attend the events .
- JOI-kun will attend the events .
Since the sequence is smaller than the sequence in lexicographic order, output .
Sample Input 2
4 3
1 4
3 5
4 9
7 10
Sample Output 2
-1
Explanation for Sample 2
Since it is impossible for JOI-kun to attend exactly events, output -1
.
Sample Input 3
10 6
77412002 93858605
244306432 318243514
280338037 358494212
439397354 492065507
485779890 529132783
571714810 632053254
659767854 709114867
718405631 733610573
786950301 815106357
878719468 899999649
Sample Output 3
1
2
4
6
7
8
Explanation for Sample 3
This sample input satisfies the constraints of all Subtasks.
Sample Input 4
20 16
250732298 258217736
26470443 34965880
252620676 260043105
692063405 697656580
497457675 504191511
391372149 397942668
858168758 867389085
235756850 241022021
585764751 593366541
207824318 217052204
661682908 671226688
886273261 892279963
770109416 778960597
264372562 270395107
176883483 186662376
509929119 519063796
109491630 118520141
162731982 168101507
662727316 668317158
757072772 765493222
Sample Output 4
1
2
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Comments