Task: Program Execution
Input (English): 3407, x, 4105, 8607, 3641, U, H
Output (English): 1, 3, 4, 5