Task: Program Execution
Input (English): q, 5071, 8147, R, P, F, n, T, 1791, 9635, x, 4307
Output (English): 5071, 8147, 1791, 9635, 4307