These are the tasks, if anyone has any idea how to do / solve this I would appriciate it.
1. At the beginning we have only the input vertex w in the stack. Furthermore, at each v peak, we remember the zv tag, which indicates whether we have already visited the peak. The entrance peak is marked, the other peaks are not.
2. Remove the vertex from the stack, call it u.
3. Add any unmarked vertex to which the edge of u leads to the stack and mark it.
4. Repeat steps 2 and 3 until the tray is empty.