Task: Program Execution
Input (English): Q, P, 2973, E, 6119, 4143, 8499, 3787, 8537, d, Z, 9249, R
Output (English): Q, P, E, d, Z, R