Task: Program Execution
Input (English): X, 217, Q, 951, I, I, 59
Output (English): 1227