Task: Program Execution
Input (English): h, G, X, 9909, X, O
Output (English): 8, 7, 24, 9909, 24, 15