Task: Program Execution
Input (English): 1, 5, ['P', '7427', '9519', '8289', 'M', '8677', '1073']
Output (English): M982891597247P