Task: Program Execution
Input (English): 5787, 5663, 5621, 2315, 9419, r, X, p, 7165, K, 3495, l, r, b, 3529, 9819, B, g, x, 403, b, Y, t
Output (English): 5787, 5663, 5621, 2315, 9419, 18, 24, 16, 7165, 11, 3495, 12, 18, 2, 3529, 9819, 2, 7, 24, 403, 2, 25, 20