125. Insert at the End
Build the list, read a value k, append a new node holding k at the end,
and print the resulting list.
Appending needs the LAST node, which means walking to it first.
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 the value to append.
Output
Print the resulting list from head to tail on ONE line, separated by single spaces, or Empty if no nodes remain.
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.