Task: Program Execution
Input (English): N, F, 9829, 5117, 3819, Y, Z
Output (English): N, F, Y, Z