A space explorer plans to go on an expedition to a remote planet. In his path, there are several space objects given in order of visiting them, each of which has its own unique value for exploration. Each object requires a certain amount of energy (in units) and time (in days) for the study.
However, the explorer has a limitation on the amount of available energy $$$K$$$ and time $$$M$$$ to complete the mission. It is necessary to create an optimal sequence of visiting objects that maximizes the scientific value of the expedition, taking into account the constraints on energy and time.
The first line contains three space-separated integers: the number of space objects $$$1 \le N \le 100$$$ and the limitations on energy $$$1 \le K \le 100$$$ and time $$$1 \le M \le 100$$$.
Each of the next $$$N$$$ lines described an object and contains three integers: its scientific value $$$0 \le V \le 150$$$, the amount of energy $$$1 \le F \le 50$$$ required, and the time in days $$$1 \le T \le 20$$$ needed for exploration.
The first line should contain a number: the maximum scientific value of the exploration. The second line should contain the sequence of visiting objects.
It is assumed that the objects are numbered sequentially, starting from one. The explorer can only visit them in the specified order.
If it is not possible to explore any object, output 0.
If there are several possible solutions, output any one of them.
5 60 10100 20 380 17 250 10 4120 25 460 12 2
280 1 4 5
2 12 1067 15 9120 4 15
0
4 40 3030 7 1050 16 1280 12 2015 5 7
110 1 3
| Name |
|---|


