Output graph edges in deterministic order

Makes the tests reliable.