Task: Program Execution
Input (English): 4987, S, 35, X, D, 9447, L, 5151, 1101, X, 4815, 3237, J, 6629, Z, T, 199, i, e, q, m, 8607, 5055
Output (English): S, X, D, L, X, J, Z, T, i, e, q, m