Digraph as alternate solution