Task: Program Execution
Input (English): 2, 5, ['Q', '3549', '6821', 'G', 'P']
Output (English): P, G, 6821, 3549