Task: Program Execution
Input (English): 3, ['5985', '7989', 'k', '6807', '6969', '9267', '5093', '2729', 'q', '989', 'U', 'B']
Output (English): 5985, 6807, 5093, 989