This puzzle was mentioned by W. W. Rouse Ball in the third, 1896, edition of his book Mathematical Recreations And Problems Of Past And Present Times, and is said to have been a favorite problem of Lewis Carroll.