Break time is over and AQT needs to get his students to pay attention to class. AQT can give three different instructions to his students: A - Stop playing games
, B - Stop playing on your phones
, and C - Stop watching Youtube
.
At first, every one of AQT's students are playing games, playing on their phones, and watching YouTube, all at the same time. Student has concentration levels , , and for activities , , and respectively. For activity , once AQT says Stop doing X
times, student will stop all his activities and start paying attention to class.
Giving instructions takes time, so AQT wants to minimize the total number of instructions he needs to get all of his students to pay attention to class. Help AQT find what , , and should be.
Constraints
For all subtasks:
Subtask 1 [40%]
Subtask 2 [60%]
No additional constraints.
Input Specification
The first line of input will contain .
The next lines will contain , , and .
Output Specification
Print any valid , , and that minimizes .
Sample Input
3
1 3 9
3 4 1
5 2 5
Sample Output
1 2 1
Explanation
Once AQT says A - Stop playing games
time, student starts paying attention.
Once AQT says B - Stop playing on your phones
times, student starts paying attention.
Once AQT says C - Stop watching Youtube
time, student starts paying attention.
Here, A B C
is 1 2 1
.
0 3 1
is also a valid answer.
It can be proven that there is no solution that uses less than total operations.
Comments