digraph G {
  rankdir=LR;
  a [label="4"]
  b [label="5"]
  c [label="2"]
  d [label="0"]
  e [label="9"]
  f [label="8"]
  g [label="1"]
  h [label="4"]

  a -> b;
  b -> c;
  c -> d;
  d -> e;
  e -> f;
  f -> g;
  g -> h;
}