Trying real recursion and backtracking.