Task: Program Execution
Input (English): 3, 18, ['5225', 'd', '1149', 'c', 'f', '8889', '7395', '6943', 'e', '765', '5709', 'n', '3449', '3143', 'F', '1161', '2511', 'K', '6235']
Output (English): 41114