Task: Program Execution
Input (English): 3, 3, ['F', '1273', 'N', 'B', 'T', '8037', 't', '891', '4559', '7585', '1701', '6695', 'M', 'r', '7247', 'X', 'F']
Output (English): N, 8037, 4559, 6695, 7247