Task: Program Execution
Input (English): H, 3181, R, D, r, w, H, n, 1901, 1651, m, O, 5835, U
Output (English): 1, 3, 4, 5, 6, 7, 8, 11, 12, 14