Task: Program Execution
Input (English): 5901, 4811, M, W, 6641, P, m, 6559, a, n, H, M, W, 1765, Y, 2839, R
Output (English): 1, 2, 5, 8, 14, 16