Task: Program Execution
Input (English): 4, 5, ['3413', 'B', 'Z', '271', 'N', 'R', '9305', 'N']
Output (English): N172