Task: Program Execution
Input (English): B, N, 7321, 7109, Q, Q, 9463
Output (English): 2, 14, 7321, 7109, 17, 17, 9463