Task: Program Execution
Input (English): 7, 12, ['K', '5995', '5183', '67', '563', '9143', 'M', 'H', '2923', '1825', 'y', '373', 'm', 'w', 'x']
Output (English): 5121