Task: Program Execution
Input (English): L, G, 3981, p, U, 7947, V, 7131, 5603, 305, H
Output (English): 12, 7, 3981, 16, 21, 7947, 22, 7131, 5603, 305, 8