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