Depth first search of a maze