Depth First Search to Search Word