Task: Program Execution
Input (English): 5, 10, ['X', 'F', '799', '5775', 'R', 'M', 'Q', '637', 'M', 'm', '5195', '1151', 'm', '7771', 'Z']
Output (English): m, M, 637, Q, M, R