Task: Program Execution
Input (English): Q, G, 1589, 3129, L, a, 401, f
Output (English): 1589, 3129, 401