Task: Program Execution
Input (English): 3, 5, ['3877', 'Z', 'R', 'M', 'K', 'B']
Output (English): K, M, R