Ticket 2837
Problem 1658 -e
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
6 3
16 5 12 15 8 36 
14 27 25 3 34 26 
28 21 7 2 19 32 
31 20 1 24 9 23 
22 11 18 13 29 4 
17 10 6 30 35 33 
Expected Output
GGGGGM
GGGGMM
GGGGMM
GGGGGM
GGGGGG
GGGGGG
Generator Parameters
--n_cap 2000 --n_high 9 --n_low 3