Task: Program Execution
Input (English): 8257, 1707, 6821, 1543, 5535, 1659, 7127, 9573, 3, 9939, 291, 1753, H, 4225, 9549, 7781, 715, 5317, M, 5, 6151, V, 2467, 5219
Output (English): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 20, 21, 23, 24