Task: Program Execution
Input (English): 2, 3, ['3187', '3351', '3647', '9627', '5211', 'f', '5887', '2677', '2729', 'M', '6667', '5345', '7741', '9721', '6485', 'm', '8303']
Output (English): 3351, 5211, 2677, 6667, 9721, 8303