Task: Program Execution
Input (English): 1839, Q, d, 1633, k, 2971, Z, x, 3777, 4839, L, 2987, 4175, L, f
Output (English): 1839, 1633, 2971, 3777, 4839, 2987, 4175