Task: Program Execution
Input (English): M 6407 4563 6173 G 2315 t f w w 2439 2485 S L 2045 4621 x 1435 w 1195 5179 6123 l 5393 k 419 f 9249 x g 1063 l 9777 8913 4811 3985 o D 143
Output (English): 13, 6407, 4563, 6173, 7, 2315, 20, 6, 23, 23, 2439, 2485, 19, 12, 2045, 4621, 24, 1435, 23, 1195, 5179, 6123, 12, 5393, 11, 419, 6, 9249, 24, 7, 1063, 12, 9777, 8913, 4811, 3985, 15, 4, 143