Task: Program Execution
Input (English): 3, 6, ['7589', '4189', '1819', '791', '4245', '6375', 'D']
Output (English): 13230