Task: Program Execution
Input (English): 6565 9245 4507 M 8635 5317 2627 3259 Q 1657 j 4965 N 9865 3467 3015 Q R 4155 v B K 6497 h 7489 8461 X T 8977 9059 z 3301 b v q X U 1013
Output (English): 6565, 9245, 4507, 13, 8635, 5317, 2627, 3259, 17, 1657, 10, 4965, 14, 9865, 3467, 3015, 17, 18, 4155, 22, 2, 11, 6497, 8, 7489, 8461, 24, 20, 8977, 9059, 26, 3301, 2, 22, 17, 24, 21, 1013