Task: Program Execution
Input (English): J, Q, 6873, u, z, U, T, M, 7111
Output (English): 3, 9