Task: Program Execution
Input (English): 3, ['U', '5147', '771', 'q', 'r', 'I', 'B']
Output (English): U, q, B