answer to Ruby Quiz on wordchains: http://web.archive.org/web/20130215052516/http://rubyquiz.com/quiz44.html