Task: Program Execution
Input (English): a, 4097, 5871, d, p, c, 7837, g, 5819, 5109, e, 3775, x, a
Output (English): a, c, d, e, g, p, x