Multigraph representation

Now terms like yyy have representations for 3 edges, not just 1.