129. Delete a Value
Build the list, read a value k, and remove the first node holding k.
Print the resulting list, or Empty if nothing remains. If k is not in the list, print
the list unchanged.
Constraints - `0 ≤ n ≤ 100000` - `-1000000 ≤ value, k ≤ 1000000`
Input
The first line contains an integer n, the number of nodes.
The second line contains n space-separated integers — the node values from head to tail.
The starter code builds the list for you; work on the nodes, not the array.
The third line contains an integer k.
Output
Print the resulting list from head to tail on ONE line, separated by single spaces, or Empty if no nodes remain. If k is absent, print the list unchanged.