Task: Program Execution
Input (English): 5423, 8879, U, M, 2939, d
Output (English): 3, 4, 6