The program input is from the standard input. Each data set in the input has the following format:
- n - the number of clients (n <= 100)
- on n separate lines the number of days (at most 100) each client wishes to rent the boat;
- the total number of choices for all clients;
- the list of choices in the format client_id, deadline, amount_of_money where the client id is a positive integer in the range 1..n and deadline <= 100.
An empty line separates the input data sets.