Task: Program Execution
Input (English): 5, ['5829', '9831', 'X', '6589', 'A', '3973', '1559', 'N', '4013', 'z', 'Y', 'N']
Output (English): 5829, 9831, X, 6589, A, 3973, 1559