Task: Program Execution
Input (English): 2187, 485, N, Q, 5831, 3755, 5213, C
Output (English): 1, 2, 5, 6, 7