Task: Program Execution
Input (English): 3, 5, ['167', '3361', '7725', '4723', 'M', '7911', '9917', '777']
Output (English): 77254723M