Task: Program Execution
Input (English): x, i, 3989, k, 3267, z, r, 5861
Output (English): i, k, r, x, z