Output from oblig 1.
Tries to implement DAG.