read edge pattern to create adjlist (old edge fotmat)