On the Depth between Beam Search and Exhaustive Search for Text Generation