Solution for problem [Word Ladder]