Task: Program Execution
Input (English): 6, 7, ['7397', '5163', '2859', '7677', '9313', '7371', 'n', '547', '3785', '999', '2163', '4135', 'P']
Output (English): 7371