digraph G { graph [rankdir="LR"]; 0 [color="green" shape="doublecircle" style="filled"]; 1 [color="red" shape="circle" style="filled"]; 2 [color="black" shape="circle" style="filled" fillcolor="white"]; 3 [color="red" shape="circle" style="filled"]; 4 [color="black" shape="doublecircle" style="filled" fillcolor="white"]; 5 [color="black" shape="circle" style="filled" fillcolor="white"]; 6 [color="black" shape="doublecircle" style="filled" fillcolor="white"]; 7 [color="black" shape="circle" style="filled" fillcolor="white"]; 8 [color="red" shape="circle" style="filled"]; 9 [color="black" shape="doublecircle" style="filled" fillcolor="white"]; 0 -> 1 [label="a"]; 1 -> 3 [label="a"]; 1 -> 4 [label="b"]; 0 -> 2 [label="b"]; 2 -> 5 [label="a"]; 5 -> 7 [label="b"]; 7 -> 8 [label="a"]; 7 -> 9 [label="b"]; 2 -> 6 [label="b"]; }