A C 2  # sample graph data
B  A  4  # an edge
C  B  6  # the following line is invalid and is skipped
A D A
 C D  5
 C  E  1
 D  E  3
  E   B 2
  E   F 1
  F   D 2

