implement the method to solve a given puzzle