Task: Program Execution
Input (English): 2, 10, ['f', 'r', 'Z', '1989', '5035', '1623', '9335', '7495', '8663', '2199', '2047', 'o']
Output (English): 36339