Task: Program Execution
Input (English): M n 4835 S 4397 3647 Z 3681 a 9865 4083 2377 S 4371 t i 8315 X 9683 4723 M 2985 J r 619 N
Output (English): 13, 14, 4835, 19, 4397, 3647, 26, 3681, 1, 9865, 4083, 2377, 19, 4371, 20, 9, 8315, 24, 9683, 4723, 13, 2985, 10, 18, 619, 14