Task: Program Execution
Input (English): 4561, 7159, x, J, r, X
Output (English): 3, 4, 5, 6