Task: Program Execution
Input (English): 3, 3, ['9623', '1905', '5895', '7865', 'H', 'F', 'S']
Output (English): 5895