Basic implementation of ungraph AdjList and AdjMatrix