Task: Program Execution
Input (English): M 8971 a P C 6401 M 4595 1677 37 n E 6799 y 6563 s 6715 R 343 6821 2299 3957 9525 7743 m 2235 5123 H p
Output (English): 2, 6, 8, 9, 10, 13, 15, 17, 19, 20, 21, 22, 23, 24, 26, 27