In this passage from Alice’s Adventure in Wonderland, by Lewis Carrol, Alice meets the Cheshire Cat and asks for directions.
"Would you tell me, please, which way I ought to go from here?" Alice asked.
"That depends a good deal on where you want to get to”, said the Cat.
"I don’t much care where—" said Alice.
"Then it doesn’t matter which way you go", said the Cat.
—so long as I get somewhere", Alice added as an explanation.
"Oh, you’re sure to do that," said the Cat, "if you only walk long enough".
Available at: https://standardebooks.org/ebooks/lewis-carroll/alices-adventures-in-wonderland/johntenniel/ text/single-page#chapter-6