Source: https://maths.discip.ac-caen.fr/IMG/pdf/programmer-labyrinthe.pdf