Task: Program Execution
Input (English): 2, 6, ['M', 'M', 'J', 'X', 'J', '3031', '3863', 'c', '8635', '3527', 'm', '385', '665', 'd', 'u', '7033']
Output (English): M, c, d