Recursion will stop once we reach a solution.