This is the solution for the baboons crossing the canyon puzzle