Task: Program Execution
Input (English): 5, 5, ['R', '7319', '3251', 'B', '2129', '139', 'z']
Output (English): 9212