Task: Program Execution
Input (English): 4, 8, ['r', 'Z', '2449', '6473', 'Q', 'B', 'J', 'P']
Output (English): 6473