Task: Program Execution
Input (English): r, 1373, 355, 3335, g, Q, 2743, D, 9889
Output (English): 18, 1373, 355, 3335, 7, 17, 2743, 4, 9889