Task: Program Execution
Input (English): 3, 15, ['6489', 'z', '1631', 'G', '121', '1419', '813', 'c', 'p', 'a', '6359', 'x', '8031', 'h', 'L', '1951', '9441']
Output (English): 18374