Task: Program Execution
Input (English): 5159, S, 7967, 8747, 3035, 1723, 9189, 6175, 6579, K, 2713, 3145, 1093, j, 9797, T, k, M, 6327, 7159
Output (English): 5159, 7967, 8747, 3035, 1723, 9189, 6175, 6579, 2713, 3145, 1093, 9797, 6327, 7159