Task: Program Execution
Input (English): 301 E 8831 4311 2283 M 8765 9515 1241 3779 6873 9561 9047 U 7961 d r 7025 4011 6605 6201 7119 t 1531 f
Output (English): 301, 5, 8831, 4311, 2283, 13, 8765, 9515, 1241, 3779, 6873, 9561, 9047, 21, 7961, 4, 18, 7025, 4011, 6605, 6201, 7119, 20, 1531, 6