1.You are provided with marks of physics,chemistr and math of N students. 2.You have to sort the Student's Numbers in ASCENDING Order of their Physics Marks. 3.Now, Once this is done, Only those students who have Same Marks in Physics have to be sorted in the DESCENDING order of their Chemistry Marks. 4.Then you need to Sort all those Students who have Same Marks in Physics and Chemistry in ASCENDING ORDER Of their Maths marks.
Input Format
1.First line contains an Integer 'N' denoting the size of the array. 2.Next 'N' lines contains 3 space separated elements
Output Format
Print the required sorted of Marks.
Constraints
1<= N <=10000 1<=Pi,Ci,Mi<=1000
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
10 4 5 12 1 2 3 10 9 6 4 6 5 4 3 2 4 10 10 1 2 16 10 9 32 1 14 10 10 10 4
Output
1 14 10 1 2 3 1 2 16 4 10 10 4 6 5 4 5 12 4 3 2 10 10 4 10 9 6 10 9 32