Task: Program Execution
Input (English): 2, 3, ['1485', '8491', '7219', 'h', '2015', '1689', '9869', 'S']
Output (English): 15710