Task: Program Execution
Input (English): 3, 8, ['6963', 'Q', 'X', '8793', '5507', 'N', 'Q', '1509', '7937']
Output (English): 1509, Q, N, 5507, 8793, X