Task: Program Execution
Input (English): Z, 6199, 1883, M, 8895, 6305, 317, 5497, 6103, 1113, N, 7247, k, s, g, q, e, K, e
Output (English): 6199, 1883, 8895, 6305, 317, 5497, 6103, 1113, 7247