Task: Program Execution
Input (English): 1151 G i M 9929 8565 w 1261 b P 2041 S 437 5111 M 8941 3969 L m 4379 303 2725 5233 5447 2429 2013 i v 1917 X
Output (English): 1151, 7, 9, 13, 9929, 8565, 23, 1261, 2, 16, 2041, 19, 437, 5111, 13, 8941, 3969, 12, 13, 4379, 303, 2725, 5233, 5447, 2429, 2013, 9, 22, 1917, 24