Task: Program Execution
Input (English): 6735, 3891, J, L, 9507, s, 4171, Q, 5879, 2121, p, 7031, R, N, 2979, 9475
Output (English): 51789