Ticket 2680
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 4
4 11 23 10 30 2 
6 28 24 29 21 20 
13 32 7 8 1 5 
27 17 14 35 16 12 
26 31 34 22 15 19 
9 36 3 33 18 25 
Expected Output
GGGGGG
GGGGGG
GGMGGG
GMMMGG
MMMMMG
GMMMGG
Generator Parameters
--n_cap 2000 --n_high 9 --n_low 3