Task: Program Execution
Input (English): 5, 7, ['p', 'm', '6041', 'J', '8717', '5117', 'B', '2207', '6163', 'q', 'Y', '6195', 'P', '5063', '7017', '1897']
Output (English): B51178717