Task: Program Execution
Input (English): 4819, 1565, K, Q, 1817, 379, J, x, y, S, c, 8509, B, H, N, 9181, 5151
Output (English): 10