Task: Program Execution
Input (English): 4, 4, ['u', 'Z', 'e', '253', '2663', 'q', '8421', '2509', '2831', 'H']
Output (English): 352