Task: Program Execution
Input (English): 3, 5, ['r', 'b', 'M', 'G', 'C']
Output (English): CGM