Task: Program Execution
Input (English): 7729, K, J, 3817, S, 7801, J, m, 6331, 2269, r, d, 5177, q, N, T, B
Output (English): K, J, S, J, m, r, d, q, N, T, B