Task: Program Execution
Input (English): 3, 10, ['4539', '5283', 'g', '1361', 'Z', '3267', 'i', 'P', '3987', '3949', 'i', 'n', '7507', '6055', '2267']
Output (English): 12564