Task: Program Execution
Input (English): 3, 6, ['5809', 'f', 'D', 'X', '7221', '1977', '419', '3419', 'w']
Output (English): 1977, 7221, X, D