Script can now parse input file and sort all the edges.