Task: Program Execution
Input (English): 2, 3, ['1385', '4047', 'P', 'b', '4067']
Output (English): P4047