Task: Program Execution
Input (English): 4155, 9963, M, 2991, 5689, N
Output (English): 4155, 9963, 2991, 5689