path 0 0 0 1 1 1 1 2 0 2 1 2 1 3 2 3 2 4 3 4