Task: Program Execution
Input (English): M 3877 e r 9579 c Q M Y 6079 I z S 1417 7767 1775 L 4159 2807 9505 l d d 5045 E J 3887 X B m B 6607
Output (English): 1, 3, 4, 6, 7, 8, 9, 11, 12, 13, 17, 21, 22, 23, 25, 26, 28, 29, 30, 31