Task: Program Execution
Input (English): 2, 2, ['F', 'F', 's', 'G', '717', 'R', '7547', '8805', '9175', 'R', '6835', '1587', 'A', 'M']
Output (English): F, G, R, 8805, R, 1587, M