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 GGGGGGUpdate Logs
Note: You can also use F5 to update the logs. This would also retain cursor position while scrolling.