

The first line of input contains an integer ‘T’ denoting the number of test cases.
The first line of each test case contains two space-separated integers ‘n’ and ‘m’, where ‘n’ denotes the number of trains and ‘m’ denotes the number of platforms.
Next ‘n’ lines contain three space-separated integers ‘arrival time’, ‘departure time’, and ‘platform’ number.
For every test case, return the maximum number of trains for which stoppage can provide.
Output for each test case will be printed in a separate line.
You do not need to print anything; it has already been taken care of. Just implement the given function.
1 <= T <= 100
1 <= N <= 3000
1 <= M <= 3000
0000 <= Arrival Time <= 2359
0000 <= Departure Time <= 2359
1 <= Plateform Number <= M
Where ‘T’ represents the number of test cases, ‘N’ is the number of trains, ‘M’ is the number of platforms, and ‘Arrival Time’ and ‘Departure Time’ is ‘HH:MM’ time of arrival and departure time of trains.
Time Limit: 1 sec
Logic same as Activity selection problem.
For every platform,
separate every train according to the platform number and store it in the ‘platform’ vector/list.
Sort the train according to the departure time for every platform, so that we can decide which train is overlapping with other trains.