Task: Program Execution
Input (English): 5, 5, ['D', 'k', '7997', '5967', '4307', 's', 'x']
Output (English): 4307