Task: Program Execution
Input (English): 1381, 5593, 9421, 6935, Z, 9723, N, 4981, D, M
Output (English): Z, N, D, M, 1381, 5593, 9421, 6935, 9723, 4981