Too many meetings

The MiGente.com office has only one meeting room (not really, but let's pretend for simplicity). Your job as head meeting scheduler is to schedule as many meetings as possible in the room. Each meeting has a start time and finish time where start time <= finish time. Meeting i and meeting j are considered compatible if i's start_time >= j's finish time or j's start time >= i's finish time.

Write a program, called "scheduler", to determine the most number of mutually compatible meetings that can be scheduled in one room. The program should accept 1 argument: the location of the input file.

Input specifications

The input file lists the possible meetings. Each line of the input file represents a meeting:

<meeting id> <start> <finish>

Example input file:

6 5 9 8 8 11 7 6 10 4 5 7 3 0 6 9 8 12 10 2 13 11 12 14 2 3 5 1 1 4 5 3 8

Output specifications

Your program should output each compatible meeting, ordered by their start time. If there is a tie between sets of compatible meetings, then list each set. Separate the sets by a blank line and order them by increasing meeting id.

Example output:

1 1 4 4 5 7 8 8 11 11 12 14