Task: Program Execution
Input (English): M Q 7879 K p O I 1987 381 J A 3923 v 6845 M 9765 565 8573 l R X 2907 8641 5811 505 w s q 4631 h 7623 H 7831 5179 r 8571 w 7911
Output (English): 1, 2, 4, 5, 6, 7, 10, 11, 13, 15, 19, 20, 21, 26, 27, 28, 30, 32, 35, 37