Task: Program Execution
Input (English): 587, d, Q, 5243, 4731, S, 2167, 8321, 4603, 677, D, 5255, c, 1533, 759, 4063, J
Output (English): 587, 4, 17, 5243, 4731, 19, 2167, 8321, 4603, 677, 4, 5255, 3, 1533, 759, 4063, 10