Task: Program Execution
Input (English): 5, 6, ['P', '8783', '3775', 'R', 'q', 'p', '5045', '4989', '2921']
Output (English): pq