A program to solve a maze