Parser done, checked and is correct. Algorithm returns faulty weight of
min spanning tree though, incorrect?