Task: Program Execution
Input (English): q, 2975, n, 5693, M, 7897, d, 3509, M, g, n, 3719, 9037, T, Z, 4801, 4705, 3095, 3327, 9405
Output (English): 1, 3, 5, 7, 9, 10, 11, 14, 15