Task: Program Execution
Input (English): Q, v, 5795, K, r, 6275, W, 561, 6197, 8427, 8611, v, S, e, 5929
Output (English): 1, 2, 4, 5, 7, 12, 13, 14