Complete depth-first naive