Task: Program Execution
Input (English): 4, 12, ['M', '3505', '1337', '9561', '9999', '5521', 'W', 'v', 'y', 't', 'H', '4373', '8243', 'R', '9131', 'O', '5375', 'Q', '7347']
Output (English): 29454