Task: Program Execution
Input (English): 7851, 8373, 4141, i, 1501, 4341, 655, M, L, B, B, H, H
Output (English): 1, 2, 3, 5, 6, 7