Task: Program Execution
Input (English): c, g, 1783, 337, 3677, D, z, K
Output (English): 1, 2, 6, 7, 8