Task: Program Execution
Input (English): 4, 7, ['p', 'g', '2447', '5607', 'R', '8709', '7823', '891', '7399', '4041', 'X']
Output (English): 5607R87097823