Task: Program Execution
Input (English): J 3945 7877 a O M 3697 M M 1315 7037 8851 2289 U 2809 M 6551 8445 6441 2483 3871 1821 R 555 h a 4311 3971 7465 E 59 7737 7707 S r
Output (English): 2, 3, 7, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 24, 27, 28, 29, 31, 32, 33