Task: Program Execution
Input (English): 5, 6, ['S', '2231', 'C', '8181', '2871', 'z']
Output (English): z1782