digraph { node [ shape="circle" ]; { rank=same; 1;2; } { rank=same; 3;5; } 1 -> 5 -> 4 -> 3 -> 2 -> 1; 1 -> 3; 2 -> 4; 3 -> 5; 4 -> 1; 5 -> 2; }