directed acyclic word graph