Task: Program Execution
Input (English): 5987 M h 9111 O q 8365 B 1345 b 5129 2195 639 7923 8717 F 2315 3501 7661 2511 7213 4665 Z 4783 6253 761 z Q
Output (English): 2, 3, 5, 6, 8, 10, 16, 23, 27, 28