Task: Program Execution
Input (English): M, r, 1931, q, 9475, n, 4891, 3129, C, 3961, 57, 7923
Output (English): 13, 18, 1931, 17, 9475, 14, 4891, 3129, 3, 3961, 57, 7923