Task: Program Execution
Input (English): 8473, R, m, D, A, 723, Q, r
Output (English): 8473, 18, 13, 4, 1, 723, 17, 18