read edges from stdin instead of argv
update README for new input format