Task: Program Execution
Input (English): 3, 3, ['Q', 'm', 'P', '287', 'l', '1657', '9521', '1351']
Output (English): P