Task: Program Execution
Input (English): 4, 6, ['Q', '4729', 'O', '2243', '4385', '5013', '4887', '8585']
Output (English): 310558343422