Task: Program Execution
Input (English): n, 4287, Q, 7049, 6431, H, 6351, P, 8537, J, g, 4463, 2949, 8219, 489, 2199, R, S, 4793, M, 3171, 8877
Output (English): 2, 4, 5, 7, 9, 12, 13, 14, 15, 16, 19, 21, 22