Task: Program Execution
Input (English): 3, 4, ['r', 'D', 'H', '2505', 'X', '8317']
Output (English): 2505