Task: Program Execution
Input (English): 1587, 7711, M, 5751, 6637, 7589, 5189, R, 9701, B, k, 1049, P
Output (English): 3, 8, 10, 11, 13