Task: Program Execution
Input (English): 7967, A, S, 4845, 2433, b, q, 7835, 2307, 3571, 4029, N, m, 5541
Output (English): 7967, 4845, 2433, 7835, 2307, 3571, 4029, 5541