runs and solves a maze recurively