Task: Program Execution
Input (English): 1823, f, m, 5201, K, Q, 8549, 9457, 1583, w, r, 8467, 1525, i, 1597, 1345, 6041, K, x
Output (English): 1823, 6, 13, 5201, 11, 17, 8549, 9457, 1583, 23, 18, 8467, 1525, 9, 1597, 1345, 6041, 11, 24