Task: Program Execution
Input (English): 4047, D, M, s, 3739, x, q, 1243, q
Output (English): 4047, 3739, 1243