Task: Program Execution
Input (English): 1051, J, 9809, 2745, h, 3623, 5619, w, 6289, T, 745, 2973, 637, K, 5479, 3521, m, R, V, 6119, J, D, 8993, 2965
Output (English): 10