Task: Program Execution
Input (English): 5777, 1601, 8877, 9189, 373, 7075, g, X
Output (English): 5777, 1601, 8877, 9189, 373, 7075, 7, 24