Task: Program Execution
Input (English): p Z 1605 791 9513 m 7517 7749 A 4923 M 6455 9583 g 6685 5177 6271 7767 389 1983 r U M O 4591 m 395 8041 a 2377 c
Output (English): 3, 4, 5, 7, 8, 10, 12, 13, 15, 16, 17, 18, 19, 20, 25, 27, 28, 30