Task: Program Execution
Input (English): 3, 5, ['1873', '6441', 'T', 'H', 'm', 'w']
Output (English): mHT