Task: Program Execution
Input (English): 5, 7, ['Z', '3147', 'Q', '315', 'Z', 'E', '9935']
Output (English): 5399EZ