--- /dev/null
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "import string\n",
+ "import heapq\n",
+ "import collections\n",
+ "import random"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "9815"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "words = [w.strip() for w in open('words7.txt').readlines()]\n",
+ "len(words)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "['abalone',\n",
+ " 'abandon',\n",
+ " 'abashed',\n",
+ " 'abashes',\n",
+ " 'abasing',\n",
+ " 'abating',\n",
+ " 'abdomen',\n",
+ " 'abducts',\n",
+ " 'abetted',\n",
+ " 'abetter']"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "words[:10]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def adjacents_explicit(word):\n",
+ " neighbours = []\n",
+ " for i in range(len(word)):\n",
+ " for l in string.ascii_lowercase:\n",
+ " if l != word[i]:\n",
+ " neighbours.append(word[0:i] + l + word[i+1:])\n",
+ " return neighbours"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def adjacents(word):\n",
+ " return [word[0:i] + l + word[i+1:]\n",
+ " for i in range(len(word))\n",
+ " for l in string.ascii_lowercase\n",
+ " if l != word[i]]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# neighbours = {w: [n for n in adjacents(w) if n in words]\n",
+ "# for w in words}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "worddict = {w: True for w in words}\n",
+ "neighbours = {w: [n for n in adjacents(w) if n in worddict]\n",
+ " for w in words}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[]"
+ ]
+ },
+ "execution_count": 12,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# [w for w in words if sorted(neighbours[w]) != sorted(neighbours2[w])]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 loop, best of 3: 4min 2s per loop\n"
+ ]
+ }
+ ],
+ "source": [
+ "# %%timeit\n",
+ "# neighbours = {w: [n for n in adjacents(w) if n in words]\n",
+ "# for w in words}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 loop, best of 3: 655 ms per loop\n"
+ ]
+ }
+ ],
+ "source": [
+ "%%timeit\n",
+ "worddict = {w: True for w in words}\n",
+ "neighbours2 = {w: [n for n in adjacents(w) if n in worddict]\n",
+ " for w in words}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "1 loop, best of 3: 629 ms per loop\n"
+ ]
+ }
+ ],
+ "source": [
+ "%%timeit\n",
+ "wordset = set(words)\n",
+ "neighbours3 = {w: [n for n in adjacents(w) if n in wordset]\n",
+ " for w in words}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[]"
+ ]
+ },
+ "execution_count": 18,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "neighbours['abalone']"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "['abashes']"
+ ]
+ },
+ "execution_count": 20,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "neighbours['abashed']"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "['abusing', 'abating']"
+ ]
+ },
+ "execution_count": 21,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "neighbours['abasing']"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[('abalone', []),\n",
+ " ('abandon', []),\n",
+ " ('abashed', ['abashes']),\n",
+ " ('abashes', ['abashed']),\n",
+ " ('abasing', ['abusing', 'abating']),\n",
+ " ('abating', ['abasing']),\n",
+ " ('abdomen', []),\n",
+ " ('abducts', []),\n",
+ " ('abetted', ['abutted', 'abetter']),\n",
+ " ('abetter', ['abettor', 'abetted'])]"
+ ]
+ },
+ "execution_count": 22,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "[(w, neighbours[w]) for w in words[:10]]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[('brewery', ['brewers']),\n",
+ " ('brewing', ['crewing']),\n",
+ " ('bribery', []),\n",
+ " ('bribing', []),\n",
+ " ('bricked', ['cricked', 'pricked', 'tricked', 'brisked']),\n",
+ " ('bridals', []),\n",
+ " ('bridged', ['bridled', 'bridges']),\n",
+ " ('bridges', ['fridges', 'bridles', 'bridged']),\n",
+ " ('bridled', ['bridged', 'bridles']),\n",
+ " ('bridles', ['bridges', 'bridled'])]"
+ ]
+ },
+ "execution_count": 37,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "[(w, neighbours[w]) for w in words[1000:1010]]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def distance(w1, w2):\n",
+ " return sum(1 for i in range(len(w1))\n",
+ " if w1[i] != w2[i])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "0"
+ ]
+ },
+ "execution_count": 24,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "distance('abating', 'abating')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "4"
+ ]
+ },
+ "execution_count": 25,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "distance('abating', 'abetter')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def extend(chain, closed=None):\n",
+ " if closed:\n",
+ " nbrs = set(neighbours[chain[-1]]) - closed\n",
+ " else:\n",
+ " nbrs = neighbours[chain[-1]]\n",
+ " return [chain + [s] for s in nbrs\n",
+ " if s not in chain]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[['bridges', 'fridges'], ['bridges', 'bridles'], ['bridges', 'bridged']]"
+ ]
+ },
+ "execution_count": 38,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "extend(['bridges'])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[['bridges', 'bridles', 'bridled']]"
+ ]
+ },
+ "execution_count": 39,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "extend(['bridges', 'bridles'])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[['bridges', 'bridles', 'bridled', 'bridged']]"
+ ]
+ },
+ "execution_count": 40,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "extend(['bridges', 'bridles', 'bridled'])"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def bfs_search(start, goal, debug=False):\n",
+ " agenda = [[start]]\n",
+ " finished = False\n",
+ " while not finished and agenda:\n",
+ " current = agenda[0]\n",
+ " if debug:\n",
+ " print(current)\n",
+ " if current[-1] == goal:\n",
+ " finished = True\n",
+ " else:\n",
+ " successors = extend(current)\n",
+ " agenda = agenda[1:] + successors\n",
+ " if finished:\n",
+ " return current\n",
+ " else:\n",
+ " return None "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 70,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def bfs_search_closed(start, goal, debug=False):\n",
+ " agenda = [[start]]\n",
+ " closed = set()\n",
+ " finished = False\n",
+ " while not finished and agenda:\n",
+ " current = agenda[0]\n",
+ " if debug:\n",
+ " print(current)\n",
+ " if current[-1] == goal:\n",
+ " finished = True\n",
+ " else:\n",
+ " closed.add(current[-1])\n",
+ " successors = extend(current, closed)\n",
+ " agenda = agenda[1:] + successors\n",
+ " if finished:\n",
+ " return current\n",
+ " else:\n",
+ " return None "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 71,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def dfs_search(start, goal, debug=False):\n",
+ " agenda = [[start]]\n",
+ " finished = False\n",
+ " while not finished and agenda:\n",
+ " current = agenda[0]\n",
+ " if debug:\n",
+ " print(current)\n",
+ " if current[-1] == goal:\n",
+ " finished = True\n",
+ " else:\n",
+ " successors = extend(current)\n",
+ " agenda = successors + agenda[1:]\n",
+ " if finished:\n",
+ " return current\n",
+ " else:\n",
+ " return None "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 72,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def astar_search(start, goal, debug=False):\n",
+ " agenda = [(distance(start, goal), [start])]\n",
+ " heapq.heapify(agenda)\n",
+ " finished = False\n",
+ " while not finished and agenda:\n",
+ " _, current = heapq.heappop(agenda)\n",
+ " if debug:\n",
+ " print(current)\n",
+ " if current[-1] == goal:\n",
+ " finished = True\n",
+ " else:\n",
+ " successors = extend(current)\n",
+ " for s in successors:\n",
+ " heapq.heappush(agenda, (len(current) + distance(s[-1], goal) - 1, s))\n",
+ " if finished:\n",
+ " return current\n",
+ " else:\n",
+ " return None "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 73,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "def astar_search_closed(start, goal, debug=False):\n",
+ " agenda = [(distance(start, goal), [start])]\n",
+ " heapq.heapify(agenda)\n",
+ " closed = set()\n",
+ " finished = False\n",
+ " while not finished and agenda:\n",
+ " _, current = heapq.heappop(agenda)\n",
+ " if debug:\n",
+ " print(current)\n",
+ " if current[-1] == goal:\n",
+ " finished = True\n",
+ " else:\n",
+ " closed.add(current[-1])\n",
+ " successors = extend(current, closed)\n",
+ " for s in successors:\n",
+ " heapq.heappush(agenda, (len(current) + distance(s[-1], goal) - 1, s))\n",
+ " if finished:\n",
+ " return current\n",
+ " else:\n",
+ " return None "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Mutually-reachable sets\n",
+ "\n",
+ "Find the transitive closure of the `neighbours` relation, so we can see which words can be transformed into which other words."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "5109"
+ ]
+ },
+ "execution_count": 41,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "candidates = [set([k] + neighbours[k]) for k in neighbours]\n",
+ "reachables = []\n",
+ "while candidates:\n",
+ " current = set(candidates.pop())\n",
+ " altered = False\n",
+ " for other in candidates:\n",
+ " if current.intersection(other):\n",
+ " altered = True\n",
+ " current.update(other)\n",
+ " candidates.remove(other)\n",
+ " if altered:\n",
+ " candidates.append(current)\n",
+ " else:\n",
+ " reachables.append(current)\n",
+ "\n",
+ "len(reachables)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "1400"
+ ]
+ },
+ "execution_count": 42,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "len(max(reachables, key=len))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "1"
+ ]
+ },
+ "execution_count": 43,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "len(min(reachables, key=len))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Counter({1: 4102,\n",
+ " 2: 632,\n",
+ " 3: 183,\n",
+ " 4: 70,\n",
+ " 5: 35,\n",
+ " 6: 24,\n",
+ " 7: 19,\n",
+ " 8: 7,\n",
+ " 9: 11,\n",
+ " 10: 3,\n",
+ " 11: 5,\n",
+ " 12: 1,\n",
+ " 13: 4,\n",
+ " 14: 1,\n",
+ " 15: 1,\n",
+ " 17: 1,\n",
+ " 18: 1,\n",
+ " 19: 2,\n",
+ " 22: 1,\n",
+ " 25: 1,\n",
+ " 48: 1,\n",
+ " 133: 1,\n",
+ " 361: 1,\n",
+ " 773: 1,\n",
+ " 1400: 1})"
+ ]
+ },
+ "execution_count": 44,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "collections.Counter(len(r) for r in reachables)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[{'nullify', 'nullity'},\n",
+ " {'believe', 'relieve'},\n",
+ " {'wriggle', 'wriggly'},\n",
+ " {'appeals', 'appears'},\n",
+ " {'liaised', 'liaises'},\n",
+ " {'gibbons', 'ribbons'},\n",
+ " {'colonel', 'colones'},\n",
+ " {'vehicle', 'vesicle'},\n",
+ " {'unclean', 'unclear'},\n",
+ " {'yodeled', 'yodeler'},\n",
+ " {'minions', 'pinions'},\n",
+ " {'achiest', 'ashiest'},\n",
+ " {'regimen', 'regimes'},\n",
+ " {'produce', 'product'},\n",
+ " {'choicer', 'choices'},\n",
+ " {'immured', 'immures'},\n",
+ " {'retried', 'retries'},\n",
+ " {'blessed', 'blesses'},\n",
+ " {'herniae', 'hernias'},\n",
+ " {'mealier', 'meatier'},\n",
+ " {'scrubby', 'shrubby'},\n",
+ " {'treacle', 'treadle'},\n",
+ " {'redrawn', 'redraws'},\n",
+ " {'modular', 'nodular'},\n",
+ " {'lacunae', 'lacunas'},\n",
+ " {'martial', 'partial'},\n",
+ " {'jackals', 'jackass'},\n",
+ " {'ploughs', 'sloughs'},\n",
+ " {'salmons', 'saloons'},\n",
+ " {'armored', 'armorer'},\n",
+ " {'ability', 'agility'},\n",
+ " {'draping', 'drawing'},\n",
+ " {'tousled', 'tousles'},\n",
+ " {'coerced', 'coerces'},\n",
+ " {'fiestas', 'siestas'},\n",
+ " {'rankled', 'rankles'},\n",
+ " {'evolved', 'evolves'},\n",
+ " {'maestri', 'maestro'},\n",
+ " {'kennels', 'kernels'},\n",
+ " {'donkeys', 'monkeys'},\n",
+ " {'caftans', 'kaftans'},\n",
+ " {'outfits', 'outwits'},\n",
+ " {'renamed', 'renames'},\n",
+ " {'shadows', 'shadowy'},\n",
+ " {'scorers', 'snorers'},\n",
+ " {'jostled', 'jostles'},\n",
+ " {'overran', 'overrun'},\n",
+ " {'falsify', 'falsity'},\n",
+ " {'gyrated', 'gyrates'},\n",
+ " {'caverns', 'taverns'},\n",
+ " {'shushed', 'shushes'},\n",
+ " {'seventh', 'seventy'},\n",
+ " {'cabbies', 'tabbies'},\n",
+ " {'factors', 'factory'},\n",
+ " {'gnashed', 'gnashes'},\n",
+ " {'launder', 'maunder'},\n",
+ " {'focused', 'focuses'},\n",
+ " {'widened', 'wizened'},\n",
+ " {'hostels', 'hostess'},\n",
+ " {'wigwags', 'wigwams'},\n",
+ " {'postman', 'postmen'},\n",
+ " {'fortify', 'mortify'},\n",
+ " {'disport', 'distort'},\n",
+ " {'aliened', 'aligned'},\n",
+ " {'lechers', 'lechery'},\n",
+ " {'scruffs', 'scruffy'},\n",
+ " {'castled', 'castles'},\n",
+ " {'milkman', 'milkmen'},\n",
+ " {'hoodoos', 'voodoos'},\n",
+ " {'cronies', 'ironies'},\n",
+ " {'aliased', 'aliases'},\n",
+ " {'figured', 'figures'},\n",
+ " {'unnamed', 'untamed'},\n",
+ " {'perused', 'peruses'},\n",
+ " {'beckons', 'reckons'},\n",
+ " {'flakier', 'flukier'},\n",
+ " {'profane', 'propane'},\n",
+ " {'purpler', 'purples'},\n",
+ " {'detours', 'devours'},\n",
+ " {'bonnets', 'sonnets'},\n",
+ " {'clement', 'element'},\n",
+ " {'swerved', 'swerves'},\n",
+ " {'inhabit', 'inhibit'},\n",
+ " {'service', 'servile'},\n",
+ " {'fixture', 'mixture'},\n",
+ " {'fronted', 'frosted'},\n",
+ " {'heppest', 'hippest'},\n",
+ " {'masques', 'mosques'},\n",
+ " {'joyride', 'joyrode'},\n",
+ " {'boatman', 'boatmen'},\n",
+ " {'edified', 'edifies'},\n",
+ " {'copecks', 'kopecks'},\n",
+ " {'cassock', 'hassock'},\n",
+ " {'hansoms', 'ransoms'},\n",
+ " {'lucidly', 'luridly'},\n",
+ " {'tenured', 'tenures'},\n",
+ " {'kinsman', 'kinsmen'},\n",
+ " {'endorse', 'indorse'},\n",
+ " {'lizards', 'wizards'},\n",
+ " {'siphons', 'syphons'},\n",
+ " {'whooped', 'whoopee'},\n",
+ " {'topmast', 'topmost'},\n",
+ " {'equated', 'equates'},\n",
+ " {'cranium', 'uranium'},\n",
+ " {'affects', 'effects'},\n",
+ " {'seminal', 'seminar'},\n",
+ " {'defiant', 'deviant'},\n",
+ " {'roguish', 'voguish'},\n",
+ " {'archers', 'archery'},\n",
+ " {'bummest', 'rummest'},\n",
+ " {'bronchi', 'broncho'},\n",
+ " {'plowman', 'plowmen'},\n",
+ " {'brothel', 'brother'},\n",
+ " {'decline', 'recline'},\n",
+ " {'licence', 'license'},\n",
+ " {'tampons', 'tarpons'},\n",
+ " {'queried', 'queries'},\n",
+ " {'paisley', 'parsley'},\n",
+ " {'conceal', 'congeal'},\n",
+ " {'tumbrel', 'tumbril'},\n",
+ " {'exposed', 'exposes'},\n",
+ " {'gaudier', 'gauzier'},\n",
+ " {'slackly', 'slickly'},\n",
+ " {'caraway', 'faraway'},\n",
+ " {'girdled', 'girdles'},\n",
+ " {'baulked', 'caulked'},\n",
+ " {'declaim', 'reclaim'},\n",
+ " {'probate', 'prorate'},\n",
+ " {'tartans', 'tartars'},\n",
+ " {'voicing', 'voiding'},\n",
+ " {'rewrite', 'rewrote'},\n",
+ " {'pension', 'tension'},\n",
+ " {'enabled', 'enables'},\n",
+ " {'halfway', 'hallway'},\n",
+ " {'clamors', 'glamors'},\n",
+ " {'scuttle', 'shuttle'},\n",
+ " {'deleted', 'deletes'},\n",
+ " {'caveman', 'cavemen'},\n",
+ " {'retread', 'retreat'},\n",
+ " {'parkway', 'partway'},\n",
+ " {'lounged', 'lounges'},\n",
+ " {'centred', 'centres'},\n",
+ " {'sidebar', 'sidecar'},\n",
+ " {'lengths', 'lengthy'},\n",
+ " {'mislead', 'misread'},\n",
+ " {'predate', 'prelate'},\n",
+ " {'submits', 'summits'},\n",
+ " {'granges', 'oranges'},\n",
+ " {'exhaled', 'exhales'},\n",
+ " {'cumquat', 'kumquat'},\n",
+ " {'someday', 'someway'},\n",
+ " {'outgrew', 'outgrow'},\n",
+ " {'snivels', 'swivels'},\n",
+ " {'currant', 'current'},\n",
+ " {'taproom', 'taproot'},\n",
+ " {'incense', 'intense'},\n",
+ " {'showers', 'showery'},\n",
+ " {'lovable', 'movable'},\n",
+ " {'metered', 'petered'},\n",
+ " {'outcast', 'outlast'},\n",
+ " {'gaunter', 'saunter'},\n",
+ " {'spumone', 'spumoni'},\n",
+ " {'photons', 'protons'},\n",
+ " {'revenge', 'revenue'},\n",
+ " {'critter', 'fritter'},\n",
+ " {'culture', 'vulture'},\n",
+ " {'outlaws', 'outlays'},\n",
+ " {'reasons', 'seasons'},\n",
+ " {'mortice', 'mortise'},\n",
+ " {'atheism', 'atheist'},\n",
+ " {'immense', 'immerse'},\n",
+ " {'helices', 'helixes'},\n",
+ " {'gushers', 'pushers'},\n",
+ " {'clobber', 'slobber'},\n",
+ " {'deceive', 'receive'},\n",
+ " {'taxiing', 'taxying'},\n",
+ " {'newsman', 'newsmen'},\n",
+ " {'gloried', 'glories'},\n",
+ " {'deadens', 'deafens'},\n",
+ " {'jigsawn', 'jigsaws'},\n",
+ " {'custard', 'mustard'},\n",
+ " {'carrots', 'parrots'},\n",
+ " {'warship', 'worship'},\n",
+ " {'figment', 'pigment'},\n",
+ " {'amended', 'emended'},\n",
+ " {'sophism', 'sophist'},\n",
+ " {'poisons', 'prisons'},\n",
+ " {'bodices', 'codices'},\n",
+ " {'abraded', 'abrades'},\n",
+ " {'primate', 'private'},\n",
+ " {'stymied', 'stymies'},\n",
+ " {'vantage', 'vintage'},\n",
+ " {'jobless', 'joyless'},\n",
+ " {'sandman', 'sandmen'},\n",
+ " {'adduced', 'adduces'},\n",
+ " {'optical', 'optimal'},\n",
+ " {'whelked', 'whelped'},\n",
+ " {'roundly', 'soundly'},\n",
+ " {'testify', 'testily'},\n",
+ " {'sourced', 'sources'},\n",
+ " {'fearful', 'tearful'},\n",
+ " {'neighed', 'weighed'},\n",
+ " {'outside', 'outsize'},\n",
+ " {'dappled', 'dapples'},\n",
+ " {'scrolls', 'strolls'},\n",
+ " {'secrete', 'secrets'},\n",
+ " {'conveys', 'convoys'},\n",
+ " {'implied', 'implies'},\n",
+ " {'sluiced', 'sluices'},\n",
+ " {'piloted', 'pivoted'},\n",
+ " {'sandals', 'vandals'},\n",
+ " {'thereby', 'whereby'},\n",
+ " {'refrain', 'retrain'},\n",
+ " {'grandma', 'grandpa'},\n",
+ " {'deforms', 'reforms'},\n",
+ " {'foments', 'moments'},\n",
+ " {'beliefs', 'reliefs'},\n",
+ " {'closure', 'cloture'},\n",
+ " {'comings', 'copings'},\n",
+ " {'topsail', 'topsoil'},\n",
+ " {'oration', 'ovation'},\n",
+ " {'abashed', 'abashes'},\n",
+ " {'enrolls', 'unrolls'},\n",
+ " {'hurrahs', 'hurrays'},\n",
+ " {'waltzed', 'waltzes'},\n",
+ " {'dunnest', 'funnest'},\n",
+ " {'scrimps', 'shrimps'},\n",
+ " {'fission', 'mission'},\n",
+ " {'whizzed', 'whizzes'},\n",
+ " {'telexed', 'telexes'},\n",
+ " {'tempted', 'tempter'},\n",
+ " {'damaged', 'damages'},\n",
+ " {'quarter', 'quartet'},\n",
+ " {'phrased', 'phrases'},\n",
+ " {'freeman', 'freemen'},\n",
+ " {'artiste', 'artists'},\n",
+ " {'trebled', 'trebles'},\n",
+ " {'formals', 'formats'},\n",
+ " {'quizzed', 'quizzes'},\n",
+ " {'festive', 'restive'},\n",
+ " {'eclipse', 'ellipse'},\n",
+ " {'tribune', 'tribute'},\n",
+ " {'combats', 'wombats'},\n",
+ " {'freebee', 'freebie'},\n",
+ " {'copulae', 'copulas'},\n",
+ " {'reverie', 'reverse'},\n",
+ " {'employe', 'employs'},\n",
+ " {'alleged', 'alleges'},\n",
+ " {'jazzing', 'razzing'},\n",
+ " {'deplete', 'replete'},\n",
+ " {'pigeons', 'wigeons'},\n",
+ " {'obliged', 'obliges'},\n",
+ " {'magneto', 'magnets'},\n",
+ " {'maydays', 'paydays'},\n",
+ " {'dumbest', 'numbest'},\n",
+ " {'retyped', 'retypes'},\n",
+ " {'angular', 'annular'},\n",
+ " {'display', 'misplay'},\n",
+ " {'bewared', 'bewares'},\n",
+ " {'interne', 'interns'},\n",
+ " {'linings', 'livings'},\n",
+ " {'baseman', 'basemen'},\n",
+ " {'diverge', 'diverse'},\n",
+ " {'assayed', 'essayed'},\n",
+ " {'acceded', 'accedes'},\n",
+ " {'animism', 'animist'},\n",
+ " {'cutback', 'outback'},\n",
+ " {'burgeon', 'surgeon'},\n",
+ " {'accrued', 'accrues'},\n",
+ " {'imputed', 'imputes'},\n",
+ " {'aphasia', 'aphasic'},\n",
+ " {'kittens', 'mittens'},\n",
+ " {'glanced', 'glances'},\n",
+ " {'jimmied', 'jimmies'},\n",
+ " {'gummier', 'yummier'},\n",
+ " {'miscued', 'miscues'},\n",
+ " {'saluted', 'salutes'},\n",
+ " {'smokers', 'stokers'},\n",
+ " {'drummed', 'drummer'},\n",
+ " {'explode', 'explore'},\n",
+ " {'detoxed', 'detoxes'},\n",
+ " {'cruelly', 'cruelty'},\n",
+ " {'calcine', 'calcite'},\n",
+ " {'hardest', 'harvest'},\n",
+ " {'hawkish', 'mawkish'},\n",
+ " {'patinae', 'patinas'},\n",
+ " {'skulked', 'skunked'},\n",
+ " {'lawyers', 'sawyers'},\n",
+ " {'glacier', 'glazier'},\n",
+ " {'spriest', 'spryest'},\n",
+ " {'healthy', 'wealthy'},\n",
+ " {'jurists', 'purists'},\n",
+ " {'insider', 'insides'},\n",
+ " {'chooses', 'choosey'},\n",
+ " {'kneeled', 'knelled'},\n",
+ " {'anneals', 'annuals'},\n",
+ " {'aspired', 'aspires'},\n",
+ " {'parlays', 'parleys'},\n",
+ " {'cession', 'session'},\n",
+ " {'egotism', 'egotist'},\n",
+ " {'spectra', 'spectre'},\n",
+ " {'privets', 'trivets'},\n",
+ " {'bleaker', 'breaker'},\n",
+ " {'fateful', 'hateful'},\n",
+ " {'reactor', 'realtor'},\n",
+ " {'liquefy', 'liquify'},\n",
+ " {'thrifts', 'thrifty'},\n",
+ " {'huffier', 'puffier'},\n",
+ " {'adhered', 'adheres'},\n",
+ " {'roseate', 'rosette'},\n",
+ " {'audible', 'audibly'},\n",
+ " {'bronzed', 'bronzes'},\n",
+ " {'evinced', 'evinces'},\n",
+ " {'woodman', 'woodmen'},\n",
+ " {'defence', 'defense'},\n",
+ " {'defends', 'depends'},\n",
+ " {'earthed', 'earthen'},\n",
+ " {'moussed', 'mousses'},\n",
+ " {'ghastly', 'ghostly'},\n",
+ " {'thieved', 'thieves'},\n",
+ " {'sheathe', 'sheaths'},\n",
+ " {'analyse', 'analyst'},\n",
+ " {'caddish', 'faddish'},\n",
+ " {'septets', 'sextets'},\n",
+ " {'fixated', 'fixates'},\n",
+ " {'caloric', 'calorie'},\n",
+ " {'denials', 'menials'},\n",
+ " {'restful', 'zestful'},\n",
+ " {'lasagna', 'lasagne'},\n",
+ " {'dryness', 'wryness'},\n",
+ " {'leagued', 'leagues'},\n",
+ " {'journey', 'tourney'},\n",
+ " {'showier', 'snowier'},\n",
+ " {'hideous', 'hideout'},\n",
+ " {'intoned', 'intones'},\n",
+ " {'imagine', 'imaging'},\n",
+ " {'perjure', 'perjury'},\n",
+ " {'albumen', 'albumin'},\n",
+ " {'legally', 'regally'},\n",
+ " {'applied', 'applies'},\n",
+ " {'villain', 'villein'},\n",
+ " {'arching', 'arcking'},\n",
+ " {'imbibed', 'imbibes'},\n",
+ " {'wastage', 'wattage'},\n",
+ " {'inshore', 'onshore'},\n",
+ " {'loathed', 'loathes'},\n",
+ " {'dearths', 'hearths'},\n",
+ " {'dulness', 'fulness'},\n",
+ " {'foamier', 'loamier'},\n",
+ " {'cannier', 'pannier'},\n",
+ " {'bequest', 'request'},\n",
+ " {'gossips', 'gossipy'},\n",
+ " {'droning', 'ironing'},\n",
+ " {'lineman', 'linemen'},\n",
+ " {'casings', 'casinos'},\n",
+ " {'sniping', 'swiping'},\n",
+ " {'brewers', 'brewery'},\n",
+ " {'muscled', 'muscles'},\n",
+ " {'leafier', 'leakier'},\n",
+ " {'mourned', 'mourner'},\n",
+ " {'enclave', 'enslave'},\n",
+ " {'cockier', 'rockier'},\n",
+ " {'orators', 'oratory'},\n",
+ " {'cajoled', 'cajoles'},\n",
+ " {'policed', 'polices'},\n",
+ " {'annexed', 'annexes'},\n",
+ " {'racists', 'rapists'},\n",
+ " {'fiancee', 'fiances'},\n",
+ " {'aerials', 'serials'},\n",
+ " {'vacated', 'vacates'},\n",
+ " {'setback', 'wetback'},\n",
+ " {'deprave', 'deprive'},\n",
+ " {'crueler', 'cruller'},\n",
+ " {'bulimia', 'bulimic'},\n",
+ " {'unloved', 'unmoved'},\n",
+ " {'desired', 'desires'},\n",
+ " {'baloney', 'boloney'},\n",
+ " {'exhumed', 'exhumes'},\n",
+ " {'subside', 'subsidy'},\n",
+ " {'faintly', 'saintly'},\n",
+ " {'officer', 'offices'},\n",
+ " {'scrawls', 'sprawls'},\n",
+ " {'excreta', 'excrete'},\n",
+ " {'confide', 'confine'},\n",
+ " {'resells', 'retells'},\n",
+ " {'inflame', 'inflate'},\n",
+ " {'dourest', 'sourest'},\n",
+ " {'probing', 'proving'},\n",
+ " {'writhed', 'writhes'},\n",
+ " {'tamable', 'taxable'},\n",
+ " {'bemused', 'bemuses'},\n",
+ " {'garoted', 'garotes'},\n",
+ " {'geegaws', 'gewgaws'},\n",
+ " {'hearken', 'hearten'},\n",
+ " {'cowards', 'towards'},\n",
+ " {'enticed', 'entices'},\n",
+ " {'scallop', 'scollop'},\n",
+ " {'donated', 'donates'},\n",
+ " {'bethink', 'rethink'},\n",
+ " {'coltish', 'doltish'},\n",
+ " {'thrones', 'throngs'},\n",
+ " {'likened', 'livened'},\n",
+ " {'collide', 'collude'},\n",
+ " {'entrees', 'entries'},\n",
+ " {'bromide', 'bromine'},\n",
+ " {'haggard', 'laggard'},\n",
+ " {'quicken', 'quicker'},\n",
+ " {'ignoble', 'ignobly'},\n",
+ " {'leopard', 'leotard'},\n",
+ " {'phished', 'phisher'},\n",
+ " {'gipsies', 'gypsies'},\n",
+ " {'attuned', 'attunes'},\n",
+ " {'lividly', 'vividly'},\n",
+ " {'palaces', 'palates'},\n",
+ " {'arrived', 'arrives'},\n",
+ " {'mutated', 'mutates'},\n",
+ " {'dazzled', 'dazzles'},\n",
+ " {'tourism', 'tourist'},\n",
+ " {'cleanly', 'clearly'},\n",
+ " {'bushman', 'bushmen'},\n",
+ " {'amiable', 'amiably'},\n",
+ " {'dissect', 'dissent'},\n",
+ " {'rotated', 'rotates'},\n",
+ " {'implode', 'implore'},\n",
+ " {'footman', 'footmen'},\n",
+ " {'pirated', 'pirates'},\n",
+ " {'nuanced', 'nuances'},\n",
+ " {'solaced', 'solaces'},\n",
+ " {'parable', 'payable'},\n",
+ " {'seances', 'stances'},\n",
+ " {'resumed', 'resumes'},\n",
+ " {'hammock', 'hummock'},\n",
+ " {'beacons', 'deacons'},\n",
+ " {'ickiest', 'inkiest'},\n",
+ " {'repaint', 'reprint'},\n",
+ " {'smuggle', 'snuggle'},\n",
+ " {'analogs', 'analogy'},\n",
+ " {'peopled', 'peoples'},\n",
+ " {'limiest', 'limpest'},\n",
+ " {'subdued', 'subdues'},\n",
+ " {'eeriest', 'veriest'},\n",
+ " {'enuring', 'inuring'},\n",
+ " {'frogman', 'frogmen'},\n",
+ " {'largess', 'largest'},\n",
+ " {'affixed', 'affixes'},\n",
+ " {'whereas', 'whereat'},\n",
+ " {'elastic', 'plastic'},\n",
+ " {'babysat', 'babysit'},\n",
+ " {'amassed', 'amasses'},\n",
+ " {'carfare', 'warfare'},\n",
+ " {'oarsman', 'oarsmen'},\n",
+ " {'parents', 'patents'},\n",
+ " {'addenda', 'addends'},\n",
+ " {'victual', 'virtual'},\n",
+ " {'torment', 'torrent'},\n",
+ " {'enclose', 'inclose'},\n",
+ " {'builder', 'guilder'},\n",
+ " {'thirsts', 'thirsty'},\n",
+ " {'lineups', 'linkups'},\n",
+ " {'vibrate', 'vibrato'},\n",
+ " {'spinals', 'spirals'},\n",
+ " {'pasture', 'posture'},\n",
+ " {'enfolds', 'unfolds'},\n",
+ " {'faggots', 'maggots'},\n",
+ " {'gooiest', 'goriest'},\n",
+ " {'baleful', 'baneful'},\n",
+ " {'chemise', 'chemist'},\n",
+ " {'indexed', 'indexes'},\n",
+ " {'layoffs', 'payoffs'},\n",
+ " {'tannest', 'wannest'},\n",
+ " {'makings', 'takings'},\n",
+ " {'gussets', 'russets'},\n",
+ " {'steeple', 'steeply'},\n",
+ " {'expanse', 'expense'},\n",
+ " {'portend', 'portent'},\n",
+ " {'cursors', 'cursory'},\n",
+ " {'fibulae', 'fibulas'},\n",
+ " {'garaged', 'garages'},\n",
+ " {'fleshly', 'freshly'},\n",
+ " {'fiercer', 'fierier'},\n",
+ " {'nostrum', 'rostrum'},\n",
+ " {'affable', 'affably'},\n",
+ " {'bandage', 'bondage'},\n",
+ " {'shyness', 'slyness'},\n",
+ " {'upstage', 'upstate'},\n",
+ " {'crewman', 'crewmen'},\n",
+ " {'leanest', 'meanest'},\n",
+ " {'unseals', 'unseats'},\n",
+ " {'inflect', 'inflict'},\n",
+ " {'tractor', 'traitor'},\n",
+ " {'blitzed', 'blitzes'},\n",
+ " {'clamour', 'glamour'},\n",
+ " {'ineptly', 'inertly'},\n",
+ " {'trotted', 'trotter'},\n",
+ " {'utopian', 'utopias'},\n",
+ " {'fascism', 'fascist'},\n",
+ " {'firearm', 'forearm'},\n",
+ " {'cubicle', 'cuticle'},\n",
+ " {'ukelele', 'ukulele'},\n",
+ " {'needled', 'needles'},\n",
+ " {'broiled', 'broiler'},\n",
+ " {'pommels', 'pummels'},\n",
+ " {'pomaded', 'pomades'},\n",
+ " {'humored', 'rumored'},\n",
+ " {'squashy', 'squishy'},\n",
+ " {'milieus', 'milieux'},\n",
+ " {'clubbed', 'flubbed'},\n",
+ " {'queenly', 'queerly'},\n",
+ " {'attired', 'attires'},\n",
+ " {'heedful', 'needful'},\n",
+ " {'scythed', 'scythes'},\n",
+ " {'tabular', 'tubular'},\n",
+ " {'nerving', 'serving'},\n",
+ " {'rebuild', 'rebuilt'},\n",
+ " {'tartest', 'tautest'},\n",
+ " {'protean', 'protein'},\n",
+ " {'hotshot', 'potshot'},\n",
+ " {'curious', 'furious'},\n",
+ " {'tipsier', 'tipster'},\n",
+ " {'beetled', 'beetles'},\n",
+ " {'imposed', 'imposes'},\n",
+ " {'aimless', 'airless'},\n",
+ " {'sibling', 'sidling'},\n",
+ " {'topical', 'typical'},\n",
+ " {'batsman', 'batsmen'},\n",
+ " {'jujitsu', 'jujutsu'},\n",
+ " {'coroner', 'coronet'},\n",
+ " {'capital', 'capitol'},\n",
+ " {'offence', 'offense'},\n",
+ " {'briefed', 'briefer'},\n",
+ " {'central', 'ventral'},\n",
+ " {'chiding', 'chiming'},\n",
+ " {'bloused', 'blouses'},\n",
+ " {'unlaced', 'unlaces'},\n",
+ " {'replied', 'replies'},\n",
+ " {'citrons', 'citrous'},\n",
+ " {'salient', 'sapient'},\n",
+ " {'hassled', 'hassles'},\n",
+ " {'schlepp', 'schleps'},\n",
+ " {'coronae', 'coronas'},\n",
+ " {'paraded', 'parades'},\n",
+ " {'outdoes', 'outgoes'},\n",
+ " {'invoked', 'invokes'},\n",
+ " {'emerged', 'emerges'},\n",
+ " {'digress', 'tigress'},\n",
+ " {'caption', 'caution'},\n",
+ " {'torqued', 'torques'},\n",
+ " {'grieved', 'grieves'},\n",
+ " {'lineage', 'linkage'},\n",
+ " {'opposed', 'opposes'},\n",
+ " {'goodbye', 'goodbys'},\n",
+ " {'goddess', 'godless'},\n",
+ " {'snifter', 'swifter'},\n",
+ " {'empanel', 'impanel'},\n",
+ " {'handout', 'hangout'},\n",
+ " {'elitism', 'elitist'},\n",
+ " {'valiant', 'variant'},\n",
+ " {'workman', 'workmen'},\n",
+ " {'baronet', 'bayonet'},\n",
+ " {'oarlock', 'warlock'},\n",
+ " {'deserve', 'reserve'},\n",
+ " {'bumpkin', 'pumpkin'},\n",
+ " {'chamois', 'chamoix'},\n",
+ " {'devalue', 'revalue'},\n",
+ " {'paunchy', 'raunchy'},\n",
+ " {'highest', 'nighest'},\n",
+ " {'infused', 'infuses'},\n",
+ " {'louvred', 'louvres'},\n",
+ " {'bookish', 'boorish'},\n",
+ " {'elapsed', 'elapses'},\n",
+ " {'denture', 'venture'},\n",
+ " {'consuls', 'consult'},\n",
+ " {'salvage', 'selvage'},\n",
+ " {'specced', 'specked'},\n",
+ " {'ferment', 'fervent'},\n",
+ " {'tussled', 'tussles'},\n",
+ " {'hermits', 'permits'},\n",
+ " {'honchos', 'ponchos'},\n",
+ " {'widowed', 'widower'},\n",
+ " {'cicadae', 'cicadas'},\n",
+ " {'aureola', 'aureole'},\n",
+ " {'inhered', 'inheres'},\n",
+ " {'legible', 'legibly'},\n",
+ " {'outline', 'outlive'},\n",
+ " {'present', 'prevent'},\n",
+ " {'bureaus', 'bureaux'},\n",
+ " {'desists', 'resists'},\n",
+ " {'heavens', 'leavens'},\n",
+ " {'tongued', 'tongues'},\n",
+ " {'roughly', 'toughly'},\n",
+ " {'quashed', 'quashes'},\n",
+ " {'outwore', 'outworn'},\n",
+ " {'designs', 'resigns'},\n",
+ " {'upright', 'uptight'},\n",
+ " {'revoked', 'revokes'},\n",
+ " {'skydive', 'skydove'},\n",
+ " {'consort', 'contort'},\n",
+ " {'labored', 'laborer'},\n",
+ " {'dingoes', 'lingoes'},\n",
+ " {'trestle', 'wrestle'},\n",
+ " {'favored', 'savored'},\n",
+ " {'ignored', 'ignores'},\n",
+ " {'forgave', 'forgive'},\n",
+ " {'confirm', 'conform'},\n",
+ " {'effaced', 'effaces'},\n",
+ " {'hangman', 'hangmen'},\n",
+ " {'garotte', 'gavotte'},\n",
+ " {'capable', 'capably'},\n",
+ " {'pajamas', 'pyjamas'},\n",
+ " {'opening', 'opining'},\n",
+ " {'require', 'requite'},\n",
+ " {'nemeses', 'nemesis'},\n",
+ " {'stature', 'statute'},\n",
+ " {'famines', 'gamines'},\n",
+ " {'datives', 'natives'},\n",
+ " {'pebbled', 'pebbles'},\n",
+ " {'anaemia', 'anaemic'},\n",
+ " {'emitted', 'omitted'},\n",
+ " {'sobered', 'soberer'},\n",
+ " {'clovers', 'plovers'},\n",
+ " {'rampant', 'rampart'},\n",
+ " {'mailman', 'mailmen'},\n",
+ " {'novella', 'novelle'},\n",
+ " {'usurped', 'usurper'},\n",
+ " {'calyces', 'calyxes'},\n",
+ " {'pierced', 'pierces'},\n",
+ " {'kneaded', 'kneader'},\n",
+ " {'ignited', 'ignites'},\n",
+ " {'dudgeon', 'dungeon'},\n",
+ " {'impeded', 'impedes'},\n",
+ " {'scherzi', 'scherzo'},\n",
+ " {'generic', 'genetic'},\n",
+ " {'paroled', 'parolee', 'paroles'},\n",
+ " {'civvies', 'divvied', 'divvies'},\n",
+ " {'crackle', 'crackly', 'grackle'},\n",
+ " {'pinkest', 'puniest', 'punkest'},\n",
+ " {'nebulae', 'nebular', 'nebulas'},\n",
+ " {'condoes', 'condoms', 'condors'},\n",
+ " {'steamed', 'steamer', 'stemmed'},\n",
+ " {'equable', 'equably', 'equally'},\n",
+ " {'command', 'commend', 'comment'},\n",
+ " {'stubble', 'stubbly', 'stumble'},\n",
+ " {'handbag', 'sandbag', 'sandbar'},\n",
+ " {'sponged', 'sponger', 'sponges'},\n",
+ " {'quavers', 'quavery', 'quivers'},\n",
+ " {'burnous', 'burnout', 'turnout'},\n",
+ " {'cookout', 'lockout', 'lookout'},\n",
+ " {'drivels', 'drivers', 'drovers'},\n",
+ " {'densest', 'tensest', 'tersest'},\n",
+ " {'minnows', 'windows', 'winnows'},\n",
+ " {'chequed', 'chequer', 'cheques'},\n",
+ " {'comical', 'conical', 'cynical'},\n",
+ " {'crassly', 'crossly', 'grossly'},\n",
+ " {'soluble', 'voluble', 'volubly'},\n",
+ " {'schemed', 'schemer', 'schemes'},\n",
+ " {'fidgets', 'fidgety', 'midgets'},\n",
+ " {'heights', 'weights', 'weighty'},\n",
+ " {'knacker', 'knocked', 'knocker'},\n",
+ " {'favours', 'savours', 'savoury'},\n",
+ " {'invaded', 'invader', 'invades'},\n",
+ " {'duality', 'qualify', 'quality'},\n",
+ " {'lichees', 'lichens', 'lychees'},\n",
+ " {'spruced', 'sprucer', 'spruces'},\n",
+ " {'humours', 'rumours', 'tumours'},\n",
+ " {'confuse', 'confute', 'contuse'},\n",
+ " {'cutlets', 'outlets', 'outsets'},\n",
+ " {'fistful', 'wishful', 'wistful'},\n",
+ " {'coupled', 'couples', 'couplet'},\n",
+ " {'growled', 'prowled', 'prowler'},\n",
+ " {'collage', 'collate', 'college'},\n",
+ " {'shaikhs', 'shaykhs', 'sheikhs'},\n",
+ " {'cloning', 'closing', 'cloying'},\n",
+ " {'digests', 'diverts', 'divests'},\n",
+ " {'massage', 'message', 'passage'},\n",
+ " {'storied', 'stories', 'stormed'},\n",
+ " {'fainest', 'fairest', 'vainest'},\n",
+ " {'soothed', 'soothes', 'toothed'},\n",
+ " {'deigned', 'feigned', 'reigned'},\n",
+ " {'grandee', 'grander', 'grinder'},\n",
+ " {'carbide', 'carbine', 'carmine'},\n",
+ " {'dignify', 'dignity', 'signify'},\n",
+ " {'diction', 'faction', 'fiction'},\n",
+ " {'noticed', 'notices', 'novices'},\n",
+ " {'plagued', 'plagues', 'plaques'},\n",
+ " {'scarlet', 'starlet', 'starlit'},\n",
+ " {'pursued', 'pursuer', 'pursues'},\n",
+ " {'ranched', 'rancher', 'ranches'},\n",
+ " {'sidings', 'tidings', 'timings'},\n",
+ " {'squeaks', 'squeaky', 'squeals'},\n",
+ " {'ejected', 'elected', 'erected'},\n",
+ " {'enduing', 'ensuing', 'induing'},\n",
+ " {'notable', 'notably', 'potable'},\n",
+ " {'dustman', 'dustmen', 'dustpan'},\n",
+ " {'pompoms', 'pompons', 'pompous'},\n",
+ " {'blandly', 'blankly', 'blindly'},\n",
+ " {'vaginae', 'vaginal', 'vaginas'},\n",
+ " {'spacial', 'spatial', 'special'},\n",
+ " {'editing', 'exiling', 'exiting'},\n",
+ " {'lateral', 'liberal', 'literal'},\n",
+ " {'pendant', 'pendent', 'pennant'},\n",
+ " {'purveys', 'surreys', 'surveys'},\n",
+ " {'sarapes', 'serapes', 'seraphs'},\n",
+ " {'devolve', 'resolve', 'revolve'},\n",
+ " {'reneged', 'reneges', 'renewed'},\n",
+ " {'innards', 'inwards', 'onwards'},\n",
+ " {'unified', 'unifies', 'unities'},\n",
+ " {'rescued', 'rescuer', 'rescues'},\n",
+ " {'cachets', 'sachems', 'sachets'},\n",
+ " {'condole', 'condone', 'console'},\n",
+ " {'empress', 'express', 'impress'},\n",
+ " {'alerted', 'averred', 'averted'},\n",
+ " {'badness', 'madness', 'sadness'},\n",
+ " {'swaddle', 'twaddle', 'twiddle'},\n",
+ " {'cornier', 'hornier', 'horsier'},\n",
+ " {'burnish', 'furbish', 'furnish'},\n",
+ " {'jealous', 'zealots', 'zealous'},\n",
+ " {'sublets', 'subsets', 'sunsets'},\n",
+ " {'cellars', 'collars', 'dollars'},\n",
+ " {'voyaged', 'voyager', 'voyages'},\n",
+ " {'haddock', 'paddock', 'padlock'},\n",
+ " {'process', 'profess', 'prowess'},\n",
+ " {'doorman', 'doormat', 'doormen'},\n",
+ " {'discard', 'discoed', 'discord'},\n",
+ " {'secured', 'securer', 'secures'},\n",
+ " {'shallot', 'shallow', 'swallow'},\n",
+ " {'modules', 'modulus', 'nodules'},\n",
+ " {'groomed', 'grooved', 'grooves'},\n",
+ " {'hookahs', 'hoorahs', 'hoorays'},\n",
+ " {'allayed', 'allowed', 'alloyed'},\n",
+ " {'advents', 'adverbs', 'adverts'},\n",
+ " {'tiptoed', 'tiptoes', 'tiptops'},\n",
+ " {'shadier', 'shakier', 'snakier'},\n",
+ " {'honeyed', 'moneyed', 'moseyed'},\n",
+ " {'respect', 'respell', 'respelt'},\n",
+ " {'recipes', 'recited', 'recites'},\n",
+ " {'project', 'protect', 'protest'},\n",
+ " {'dullest', 'fellest', 'fullest'},\n",
+ " {'thistle', 'whistle', 'whittle'},\n",
+ " {'regaled', 'regales', 'resales'},\n",
+ " {'naively', 'naivete', 'naivety'},\n",
+ " {'primacy', 'primary', 'privacy'},\n",
+ " {'curable', 'durable', 'durably'},\n",
+ " {'demount', 'recount', 'remount'},\n",
+ " {'accused', 'accuser', 'accuses'},\n",
+ " {'opaqued', 'opaquer', 'opaques'},\n",
+ " {'deified', 'deifies', 'deities'},\n",
+ " {'kindled', 'kindles', 'kindred'},\n",
+ " {'deflect', 'reelect', 'reflect'},\n",
+ " {'learned', 'learner', 'yearned'},\n",
+ " {'baptise', 'baptism', 'baptist'},\n",
+ " {'caromed', 'chromed', 'chromes'},\n",
+ " {'descant', 'descend', 'descent'},\n",
+ " {'impalas', 'impaled', 'impales'},\n",
+ " {'passels', 'pastels', 'tassels'},\n",
+ " {'inhaled', 'inhaler', 'inhales'},\n",
+ " {'epoxied', 'epoxies', 'epoxyed'},\n",
+ " {'capture', 'rapture', 'rupture'},\n",
+ " {'overlap', 'overlay', 'overpay'},\n",
+ " {'risible', 'visible', 'visibly'},\n",
+ " {'unbends', 'unbinds', 'unwinds'},\n",
+ " {'balance', 'valance', 'valence'},\n",
+ " {'sneaked', 'sneaker', 'speaker'},\n",
+ " {'savvied', 'savvier', 'savvies'},\n",
+ " {'gentled', 'gentler', 'gentles'},\n",
+ " {'handily', 'hardily', 'tardily'},\n",
+ " {'sprains', 'strains', 'straits'},\n",
+ " {'forgers', 'forgery', 'forgets'},\n",
+ " {'garnish', 'tarnish', 'varnish'},\n",
+ " {'gnarled', 'snailed', 'snarled'},\n",
+ " {'galleys', 'valleys', 'volleys'},\n",
+ " {'loonier', 'loonies', 'loopier'},\n",
+ " {'conduce', 'conduct', 'conduit'},\n",
+ " {'cosiest', 'nosiest', 'rosiest'},\n",
+ " {'gestate', 'restate', 'testate'},\n",
+ " {'gimpier', 'wimpier', 'wispier'},\n",
+ " {'marinas', 'mariner', 'marines'},\n",
+ " {'knitted', 'knitter', 'knotted'},\n",
+ " {'czarina', 'tsarina', 'tzarina'},\n",
+ " {'pricier', 'privier', 'privies'},\n",
+ " {'thither', 'whether', 'whither'},\n",
+ " {'jerkier', 'perkier', 'peskier'},\n",
+ " {'geneses', 'genesis', 'genuses'},\n",
+ " {'queened', 'queered', 'queerer'},\n",
+ " {'escaped', 'escapee', 'escapes'},\n",
+ " {'plodded', 'plodder', 'prodded'},\n",
+ " {'heroics', 'heroine', 'heroins'},\n",
+ " {'freshen', 'fresher', 'freshet'},\n",
+ " {'encased', 'encases', 'uncased'},\n",
+ " {'densely', 'tensely', 'tersely'},\n",
+ " {'mortals', 'mortars', 'portals'},\n",
+ " {'stylise', 'stylish', 'stylist'},\n",
+ " {'impacts', 'imparts', 'imports'},\n",
+ " {'careens', 'careers', 'carvers'},\n",
+ " {'chorale', 'chorals', 'chortle'},\n",
+ " {'gainful', 'pailful', 'painful'},\n",
+ " {'circled', 'circles', 'circlet'},\n",
+ " {'etching', 'inching', 'itching'},\n",
+ " {'sultana', 'sultans', 'suntans'},\n",
+ " {'futures', 'sutured', 'sutures'},\n",
+ " {'joshing', 'noshing', 'nothing'},\n",
+ " {'fondled', 'fondles', 'fondues'},\n",
+ " {'auction', 'section', 'suction'},\n",
+ " {'undoing', 'undying', 'untying'},\n",
+ " {'drinker', 'drunken', 'drunker'},\n",
+ " {'bluffed', 'bluffer', 'fluffed'},\n",
+ " {'foisted', 'heisted', 'hoisted'},\n",
+ " {'rubdown', 'rundown', 'sundown'},\n",
+ " {'psyched', 'psyches', 'psychos'},\n",
+ " {'lassies', 'lassoed', 'lassoes'},\n",
+ " {'baskets', 'caskets', 'gaskets'},\n",
+ " {'blueing', 'clueing', 'glueing'},\n",
+ " {'emptied', 'emptier', 'empties'},\n",
+ " {'locales', 'located', 'locates'},\n",
+ " {'merging', 'verging', 'versing'},\n",
+ " {'admired', 'admirer', 'admires'},\n",
+ " {'greened', 'greener', 'greeted', 'preened'},\n",
+ " {'dankest', 'darkest', 'lankest', 'rankest'},\n",
+ " {'abetted', 'abetter', 'abettor', 'abutted'},\n",
+ " {'threads', 'threats', 'throats', 'throaty'},\n",
+ " {'pronged', 'wringer', 'wronged', 'wronger'},\n",
+ " {'gassier', 'sassier', 'sissier', 'sissies'},\n",
+ " {'crinkle', 'crinkly', 'wrinkle', 'wrinkly'},\n",
+ " {'pardons', 'parsons', 'persona', 'persons'},\n",
+ " {'lightly', 'nightly', 'rightly', 'tightly'},\n",
+ " {'install', 'instals', 'instill', 'instils'},\n",
+ " {'dwindle', 'spindle', 'spindly', 'swindle'},\n",
+ " {'acidify', 'acidity', 'aridity', 'avidity'},\n",
+ " {'shrills', 'shrilly', 'thralls', 'thrills'},\n",
+ " {'arbours', 'ardours', 'armours', 'armoury'},\n",
+ " {'decants', 'recants', 'recasts', 'repasts'},\n",
+ " {'sedated', 'sedater', 'sedates', 'senates'},\n",
+ " {'bumpier', 'dumpier', 'jumpier', 'lumpier'},\n",
+ " {'crumble', 'crumbly', 'crumple', 'grumble'},\n",
+ " {'fastest', 'fattest', 'fittest', 'vastest'},\n",
+ " {'precise', 'premise', 'premiss', 'promise'},\n",
+ " {'dilated', 'dilates', 'diluted', 'dilutes'},\n",
+ " {'expands', 'expends', 'extends', 'extents'},\n",
+ " {'prickle', 'prickly', 'trickle', 'truckle'},\n",
+ " {'undated', 'updated', 'updater', 'updates'},\n",
+ " {'abjured', 'abjures', 'adjured', 'adjures'},\n",
+ " {'buzzing', 'fizzing', 'futzing', 'fuzzing'},\n",
+ " {'bravest', 'gravest', 'grayest', 'greyest'},\n",
+ " {'receded', 'recedes', 'seceded', 'secedes'},\n",
+ " {'wheeled', 'wheeler', 'wheezed', 'wheezes'},\n",
+ " {'twisted', 'twister', 'twitted', 'twitter'},\n",
+ " {'abasing', 'abating', 'abusing', 'amusing'},\n",
+ " {'realest', 'realise', 'realism', 'realist'},\n",
+ " {'engaged', 'engages', 'enraged', 'enrages'},\n",
+ " {'charily', 'charity', 'clarify', 'clarity'},\n",
+ " {'curfews', 'curlers', 'curlews', 'hurlers'},\n",
+ " {'avenged', 'avenger', 'avenges', 'avenues'},\n",
+ " {'distils', 'pistils', 'pistols', 'pistons'},\n",
+ " {'haziest', 'laciest', 'laziest', 'raciest'},\n",
+ " {'alluded', 'alludes', 'allured', 'allures'},\n",
+ " {'inbound', 'unbound', 'unsound', 'unwound'},\n",
+ " {'advised', 'adviser', 'advises', 'advisor'},\n",
+ " {'rebound', 'redound', 'resound', 'rewound'},\n",
+ " {'berthed', 'birched', 'birches', 'birthed'},\n",
+ " {'teasels', 'teasers', 'teazels', 'weasels'},\n",
+ " {'encrust', 'entrust', 'incrust', 'intrust'},\n",
+ " {'certain', 'curtail', 'curtain', 'pertain'},\n",
+ " {'defaced', 'defaces', 'defamed', 'defames'},\n",
+ " {'burlier', 'curlier', 'curvier', 'surlier'},\n",
+ " {'hokiest', 'holiest', 'homiest', 'pokiest'},\n",
+ " {'fielded', 'fielder', 'wielded', 'yielded'},\n",
+ " {'adapted', 'adapter', 'adaptor', 'adopted'},\n",
+ " {'anglers', 'anthems', 'anthers', 'antlers'},\n",
+ " {'assumed', 'assumes', 'assured', 'assures'},\n",
+ " {'iodised', 'iodises', 'ionised', 'ionises'},\n",
+ " {'chamber', 'clamber', 'climbed', 'climber'},\n",
+ " {'retinae', 'retinal', 'retinas', 'retinue'},\n",
+ " {'fizzled', 'fizzles', 'sizzled', 'sizzles'},\n",
+ " {'forties', 'softies', 'sortied', 'sorties'},\n",
+ " {'seethed', 'seethes', 'teethed', 'teethes'},\n",
+ " {'showman', 'showmen', 'snowman', 'snowmen'},\n",
+ " {'detract', 'refract', 'retrace', 'retract'},\n",
+ " {'screams', 'streaks', 'streaky', 'streams'},\n",
+ " {'massive', 'missile', 'missive', 'passive'},\n",
+ " {'foraged', 'forager', 'forages', 'forayed'},\n",
+ " {'dummies', 'mommies', 'mummies', 'tummies'},\n",
+ " {'despise', 'despite', 'respire', 'respite'},\n",
+ " {'deposed', 'deposes', 'reposed', 'reposes'},\n",
+ " {'fireman', 'firemen', 'foreman', 'foremen'},\n",
+ " {'boniest', 'tidiest', 'tiniest', 'toniest'},\n",
+ " {'cattily', 'hastily', 'nastily', 'nattily'},\n",
+ " {'feather', 'heathen', 'heather', 'leather', 'weather'},\n",
+ " {'average', 'operate', 'overage', 'overate', 'overawe'},\n",
+ " {'whimper', 'whisked', 'whisker', 'whiskey', 'whisper'},\n",
+ " {'enquire', 'enquiry', 'esquire', 'inquire', 'inquiry'},\n",
+ " {'daftest', 'deftest', 'leftest', 'leftism', 'leftist'},\n",
+ " {'cottage', 'hostage', 'portage', 'postage', 'pottage'},\n",
+ " {'haughty', 'naughts', 'naughty', 'nougats', 'noughts'},\n",
+ " {'brought', 'draught', 'drought', 'fraught', 'wrought'},\n",
+ " {'legatee', 'legates', 'legatos', 'negated', 'negates'},\n",
+ " {'smidgen', 'smidges', 'smidgin', 'smudged', 'smudges'},\n",
+ " {'exhorts', 'expects', 'experts', 'exports', 'extorts'},\n",
+ " {'jailers', 'jailors', 'mailers', 'sailors', 'tailors'},\n",
+ " {'departs', 'deports', 'reports', 'resorts', 'retorts'},\n",
+ " {'margins', 'marlins', 'martens', 'martini', 'martins'},\n",
+ " {'dimpled', 'dimples', 'pimples', 'wimpled', 'wimples'},\n",
+ " {'behaved', 'behaves', 'behoved', 'behoves', 'beloved'},\n",
+ " {'fatness', 'fitness', 'wetness', 'witless', 'witness'},\n",
+ " {'empires', 'expired', 'expires', 'umpired', 'umpires'},\n",
+ " {'sampled', 'sampler', 'samples', 'simpler', 'simplex'},\n",
+ " {'enacted', 'exacted', 'exacter', 'exalted', 'exulted'},\n",
+ " {'macrons', 'matrons', 'microns', 'patrols', 'patrons'},\n",
+ " {'besides', 'betided', 'betides', 'resided', 'resides'},\n",
+ " {'guessed', 'guesser', 'guesses', 'guested', 'quested'},\n",
+ " {'encoded', 'encoder', 'encodes', 'encored', 'encores'},\n",
+ " {'mileage', 'millage', 'pillage', 'tillage', 'village'},\n",
+ " {'breathe', 'breaths', 'breathy', 'wreathe', 'wreaths'},\n",
+ " {'pranced', 'prancer', 'prances', 'princes', 'trances'},\n",
+ " {'deadest', 'deafest', 'dearest', 'nearest', 'neatest'},\n",
+ " {'drizzle', 'drizzly', 'frazzle', 'frizzle', 'grizzly'},\n",
+ " {'indices', 'indicts', 'induced', 'induces', 'inducts'},\n",
+ " {'berried', 'berries', 'ferried', 'ferries', 'serried'},\n",
+ " {'demands', 'rebinds', 'remands', 'reminds', 'rewinds'},\n",
+ " {'scudded', 'studded', 'studied', 'studies', 'studios'},\n",
+ " {'decreed', 'decrees', 'decried', 'decries', 'degrees'},\n",
+ " {'ravaged', 'ravages', 'savaged', 'savager', 'savages'},\n",
+ " {'deluded', 'deludes', 'deluged', 'deluges', 'denuded', 'denudes'},\n",
+ " {'buffers', 'buffets', 'differs', 'duffers', 'suffers', 'surfers'},\n",
+ " {'quieted', 'quieter', 'quilted', 'quilter', 'quitted', 'quitter'},\n",
+ " {'manured', 'manures', 'matured', 'maturer', 'matures', 'natures'},\n",
+ " {'billion', 'bullion', 'million', 'mullion', 'pillion', 'zillion'},\n",
+ " {'defeats', 'defects', 'dejects', 'detects', 'detests', 'rejects'},\n",
+ " {'fledged', 'pledged', 'pledges', 'sledded', 'sledged', 'sledges'},\n",
+ " {'locally', 'loyally', 'loyalty', 'royally', 'royalty', 'vocally'},\n",
+ " {'blither', 'glitter', 'skitter', 'slather', 'slither', 'slitter'},\n",
+ " {'scuffle', 'shuffle', 'snaffle', 'sniffle', 'snuffle', 'souffle'},\n",
+ " {'craters', 'graders', 'graters', 'tracers', 'tracery', 'traders'},\n",
+ " {'incised', 'incises', 'incited', 'incites', 'invited', 'invites'},\n",
+ " {'dowdier', 'dowdies', 'downier', 'dowries', 'rowdier', 'rowdies'},\n",
+ " {'doubled', 'doubles', 'doublet', 'doubted', 'doubter', 'roubles'},\n",
+ " {'betaken', 'betakes', 'betoken', 'remakes', 'retaken', 'retakes'},\n",
+ " {'dizzied', 'dizzier', 'dizzies', 'fizzier', 'fuzzier', 'tizzies'},\n",
+ " {'fibbers', 'gibbers', 'gibbets', 'giblets', 'gimlets', 'goblets'},\n",
+ " {'bearded', 'boarded', 'boarder', 'hoarded', 'hoarder', 'hoarier'},\n",
+ " {'depress', 'redness', 'redress', 'regress', 'regrets', 'repress'},\n",
+ " {'excised', 'excises', 'excited', 'excites', 'excused', 'excuses'},\n",
+ " {'therein', 'thereof', 'thereon', 'wherein', 'whereof', 'whereon'},\n",
+ " {'baddest', 'baldest', 'boldest', 'coldest', 'maddest', 'saddest'},\n",
+ " {'corneal', 'corneas', 'corners', 'cornets', 'corsets', 'hornets'},\n",
+ " {'bravely', 'bravery', 'gravels', 'gravely', 'grovels', 'travels'},\n",
+ " {'fevered', 'levered', 'revered', 'reveres', 'reverts', 'severed', 'severer'},\n",
+ " {'managed', 'manager', 'manages', 'menaced', 'menaces', 'menages', 'tanager'},\n",
+ " {'alights', 'blights', 'flights', 'flighty', 'frights', 'plights', 'slights'},\n",
+ " {'rehired', 'rehires', 'retired', 'retiree', 'retires', 'rewired', 'rewires'},\n",
+ " {'divided', 'divider', 'divides', 'divined', 'diviner', 'divines', 'vivider'},\n",
+ " {'petards', 'records', 'regards', 'retards', 'rewards', 'rewords', 'reworks'},\n",
+ " {'cations', 'lotions', 'motions', 'nations', 'notions', 'potions', 'rations'},\n",
+ " {'coffees', 'coffers', 'confers', 'confess', 'taffies', 'toffees', 'toffies'},\n",
+ " {'derails', 'details', 'detains', 'regains', 'remains', 'retails', 'retains'},\n",
+ " {'crabbed', 'cribbed', 'drabber', 'drubbed', 'grabbed', 'grabber', 'grubbed'},\n",
+ " {'breezed', 'breezes', 'freezer', 'freezes', 'friezes', 'frizzed', 'frizzes'},\n",
+ " {'funnels', 'gunners', 'gunnery', 'nunnery', 'runnels', 'runners', 'tunnels'},\n",
+ " {'dirtied', 'dirtier', 'dirties', 'ditties', 'dittoed', 'dittoes', 'kitties'},\n",
+ " {'boodles', 'doodled', 'doodler', 'doodles', 'noodled', 'noodles', 'poodles'},\n",
+ " {'legions', 'lesions', 'lessees', 'lessens', 'lessons', 'lessors', 'regions'},\n",
+ " {'briskly', 'bristle', 'bristly', 'brittle', 'bruskly', 'gristle', 'gristly'},\n",
+ " {'fleeing', 'flexing', 'fluting', 'fluxing', 'freeing', 'treeing', 'trueing'},\n",
+ " {'blowers', 'flowers', 'flowery', 'glowers', 'grocers', 'grocery', 'growers'},\n",
+ " {'hectors', 'rectors', 'rectory', 'sectors', 'vectors', 'victors', 'victory'},\n",
+ " {'pennies',\n",
+ " 'peonies',\n",
+ " 'phobias',\n",
+ " 'phobics',\n",
+ " 'phonics',\n",
+ " 'phonied',\n",
+ " 'phonier',\n",
+ " 'phonies'},\n",
+ " {'capered',\n",
+ " 'catered',\n",
+ " 'caterer',\n",
+ " 'papered',\n",
+ " 'tapered',\n",
+ " 'wagered',\n",
+ " 'watered',\n",
+ " 'wavered'},\n",
+ " {'dickies',\n",
+ " 'dingier',\n",
+ " 'dinkier',\n",
+ " 'dinkies',\n",
+ " 'kickier',\n",
+ " 'kinkier',\n",
+ " 'pickier',\n",
+ " 'pinkies'},\n",
+ " {'nipples',\n",
+ " 'rippled',\n",
+ " 'ripples',\n",
+ " 'tippled',\n",
+ " 'tippler',\n",
+ " 'tipples',\n",
+ " 'toppled',\n",
+ " 'topples'},\n",
+ " {'absents',\n",
+ " 'accents',\n",
+ " 'accepts',\n",
+ " 'ascends',\n",
+ " 'ascents',\n",
+ " 'assents',\n",
+ " 'asserts',\n",
+ " 'assorts'},\n",
+ " {'regents',\n",
+ " 'reheats',\n",
+ " 'relents',\n",
+ " 'repeals',\n",
+ " 'repeats',\n",
+ " 'repents',\n",
+ " 'resents',\n",
+ " 'reveals'},\n",
+ " {'deduced',\n",
+ " 'deduces',\n",
+ " 'deducts',\n",
+ " 'reduced',\n",
+ " 'reduces',\n",
+ " 'seduced',\n",
+ " 'seducer',\n",
+ " 'seduces'},\n",
+ " {'fighter',\n",
+ " 'lighted',\n",
+ " 'lighten',\n",
+ " 'lighter',\n",
+ " 'righted',\n",
+ " 'righter',\n",
+ " 'sighted',\n",
+ " 'tighten',\n",
+ " 'tighter'},\n",
+ " {'crafted',\n",
+ " 'drafted',\n",
+ " 'draftee',\n",
+ " 'drifted',\n",
+ " 'drifter',\n",
+ " 'grafted',\n",
+ " 'grafter',\n",
+ " 'granted',\n",
+ " 'grunted'},\n",
+ " {'screwed',\n",
+ " 'splayed',\n",
+ " 'sprayed',\n",
+ " 'sprayer',\n",
+ " 'strafed',\n",
+ " 'strafes',\n",
+ " 'strawed',\n",
+ " 'strayed',\n",
+ " 'strewed'},\n",
+ " {'endured',\n",
+ " 'endures',\n",
+ " 'ensured',\n",
+ " 'ensures',\n",
+ " 'injured',\n",
+ " 'injures',\n",
+ " 'insured',\n",
+ " 'insurer',\n",
+ " 'insures'},\n",
+ " {'comfort',\n",
+ " 'commune',\n",
+ " 'commute',\n",
+ " 'compete',\n",
+ " 'comport',\n",
+ " 'compose',\n",
+ " 'compost',\n",
+ " 'compote',\n",
+ " 'compute'},\n",
+ " {'squared',\n",
+ " 'squarer',\n",
+ " 'squares',\n",
+ " 'squints',\n",
+ " 'squired',\n",
+ " 'squires',\n",
+ " 'squirms',\n",
+ " 'squirmy',\n",
+ " 'squirts'},\n",
+ " {'cleaned',\n",
+ " 'cleaner',\n",
+ " 'cleared',\n",
+ " 'clearer',\n",
+ " 'cleaved',\n",
+ " 'cleaver',\n",
+ " 'cleaves',\n",
+ " 'gleamed',\n",
+ " 'gleaned'},\n",
+ " {'diapers',\n",
+ " 'dippers',\n",
+ " 'kippers',\n",
+ " 'nippers',\n",
+ " 'rapiers',\n",
+ " 'rappers',\n",
+ " 'rippers',\n",
+ " 'tippers',\n",
+ " 'zippers'},\n",
+ " {'scalded',\n",
+ " 'scalier',\n",
+ " 'scalped',\n",
+ " 'scalpel',\n",
+ " 'scalper',\n",
+ " 'scamper',\n",
+ " 'scarcer',\n",
+ " 'scarier',\n",
+ " 'scolded'},\n",
+ " {'happier',\n",
+ " 'nappier',\n",
+ " 'nappies',\n",
+ " 'nippier',\n",
+ " 'sappier',\n",
+ " 'soapier',\n",
+ " 'soppier',\n",
+ " 'soupier',\n",
+ " 'zippier'},\n",
+ " {'bridged',\n",
+ " 'bridges',\n",
+ " 'bridled',\n",
+ " 'bridles',\n",
+ " 'cringed',\n",
+ " 'cringes',\n",
+ " 'fridges',\n",
+ " 'fringed',\n",
+ " 'fringes'}]"
+ ]
+ },
+ "execution_count": 45,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "sorted((r for r in reachables if len(r) > 1 if len(r) < 10), key=len)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'abalone; abandon; abdomen; abducts; abiding; abolish; aborted; abounds; abreast; abridge; abscess; abscond; absence; absinth; absolve; absorbs; abstain; abusers; abusive; abysmal; abysses; acacias; academy; acanthi; acclaim; accords; accosts; account; accrual; accurst; acerbic; acetate; acetone; achieve; acolyte; aconite; acquire; acquits; acreage; acrider; acrobat; acronym; acrylic; actions; actives; actress; actuary; actuate; acutely; acutest; adagios; adamant; addicts; addling; address; adenoid; adeptly; adipose; adjoins; adjourn; adjudge; adjunct; adjusts; admiral; adoring; adorned; adrenal; adulate; advance; adverse; aerator; aerobic; aerosol; affairs; affirms; afflict; affords; affrays; affront; afghans; against; ageings; ageless; agendas; agilely; agilest; agitate; agonies; agonise; aground; aileron; ailment; airdrop; airfare; airhead; airings; airlift; airline; airmail; airport; airship; airsick; airways; alarmed; albinos; alchemy; alcohol; alcoves; alertly; alfalfa; algebra; alibied; alimony; alining; alkalis; allegro; allergy; allover; alluvia; allying; almanac; almonds; alpacas; already; alright; altered; alumnae; alumnus; amalgam; amateur; amatory; amazing; amazons; ambient; ambling; amenity; ammeter; ammonia; amnesia; amnesty; amoebas; amoebic; amongst; amorous; amounts; amperes; amplest; amplify; ampoule; ampules; amputee; amulets; anagram; anapest; anarchy; anatomy; anchors; anchovy; ancient; andante; andiron; android; anemone; angelic; angered; angling; angoras; angrier; angrily; anguish; animals; animate; aniseed; anklets; annoyed; annuity; anodyne; anoints; anomaly; anoraks; another; answers; antacid; anteing; antenna; anthill; anthrax; antigen; antique; antiwar; antonym; anxiety; anxious; anybody; anymore; anytime; aphelia; aplenty; apogees; apology; apostle; apparel; appease; appends; applaud; appoint; apprise; approve; apricot; apropos; aptness; aquaria; aquatic; aquavit; aqueous; aquifer; arbiter; arbutus; arcades; archaic; archest; archive; archway; arctics; arduous; arguing; argyles; armadas; armband; armfuls; armhole; armlets; armpits; armrest; armsful; arousal; arraign; arrange; arrayed; arrears; arrests; arrival; arroyos; article; artiest; artisan; artless; artsier; artwork; ascetic; ascribe; aseptic; asexual; ashamed; ashcans; ashrams; ashtray; asinine; askance; asocial; aspects; asphalt; aspirin; assails; assault; assigns; assists; assizes; assuage; astound; astride; astuter; asunder; asylums; atavism; atelier; athlete; atlases; atriums; atrophy; attache; attacks; attains; attempt; attends; attests; attract; audited; auditor; augment; augured; aurally; auricle; auspice; austere; authors; autopsy; autumns; availed; avarice; avatars; aviator; avocado; avoided; avowals; avowing; awaited; awakens; awaking; awarded; awesome; awfully; awkward; awnings; azaleas; azimuth; babiest; baboons; babying; babyish; bacilli; backbit; backhoe; backlog; backups; baggage; bagpipe; bailiff; bailout; balcony; ballads; ballast; balloon; balsams; bamboos; bananas; bandana; banjoes; banquet; banshee; bantams; banyans; baobabs; barbell; bargain; barmaid; baroque; barrack; barrage; barrios; barroom; bashful; bassist; bassoon; bastard; bastion; bathmat; bathtub; bauxite; bawdily; bazaars; bazooka; beagles; beanbag; bearish; beastly; beatify; beatnik; becalms; because; becomes; bedbugs; bedecks; bedevil; bedlams; bedpans; bedrock; bedroll; bedroom; bedside; bedsore; bedtime; beefier; beehive; beeline; beeswax; befalls; befouls; beggars; begonia; beguile; beheads; behests; behinds; beholds; belabor; bellboy; bellhop; belongs; beltway; bemoans; beneath; benefit; benumbs; benzene; bereave; berserk; beseech; besiege; bespeak; bespoke; bestial; bestirs; bestows; bestrid; betrays; betroth; between; betwixt; beveled; bewails; bewitch; biasing; biassed; bicycle; bifocal; biggest; bighorn; bigness; bigoted; bigotry; bigwigs; bikinis; bilious; bimboes; biology; bipedal; biplane; bipolar; biretta; biscuit; bisects; bishops; bismuth; bistros; bitumen; bivalve; bivouac; bizarre; blarney; blatant; blazers; blazons; bleakly; bleeped; blemish; blintze; blossom; blotchy; blowgun; blowout; blowups; blubber; bluejay; bluntly; bobcats; bobtail; bodegas; bodkins; bogeyed; boleros; bologna; bombard; bombast; bombers; bonanza; bonbons; boneyer; bonfire; bongoes; bonitos; bonnier; bonuses; bookend; booklet; bootleg; boozers; borders; boredom; borough; borscht; bossily; bottoms; boudoir; bouquet; bourbon; bovines; boxcars; boxwood; boycott; boyhood; braille; bramble; brasher; brashly; bravado; bravura; brazens; breadth; breakup; breasts; brevity; bribery; bribing; bridals; briefly; brigade; brigand; brimful; brinier; briquet; broadly; brocade; brogans; brogues; brokers; broncos; brownie; brunets; brusque; brutish; buckets; buckeye; buckram; bucksaw; bucolic; budgets; buffalo; buffoon; bugaboo; bugbear; buildup; bulbous; bulldog; bullish; bullock; bullpen; bulrush; bulwark; bunions; buoyant; burdens; burdock; burgher; burglar; burials; burrito; bursars; bursted; busbies; busboys; bushels; busiest; buttock; buttons; buyouts; buzzard; buzzers; byelaws; bygones; bylines; bywords; cabanas; cabaret; cabbage; cabinet; caboose; cadaver; cadence; cadenza; cadging; cadmium; caducei; caesium; caesura; cagiest; cahoots; caisson; calcify; calcium; calculi; caldron; calibre; calicos; caliper; caliphs; callers; callous; calmest; calumny; calypso; cambium; cambric; cameras; camphor; campier; canapes; canards; canasta; cancans; candour; canines; cannily; cantata; canteen; canvass; caplets; caprice; capsize; capstan; capsule; captain; captive; caracul; carafes; caramel; caravan; carcass; cardiac; careful; cargoes; caribou; carjack; carnage; carotid; carouse; carport; carrion; carsick; cartoon; cascade; cashews; cassava; cassias; cassino; castoff; casuals; casuist; catalpa; catarrh; catbird; catboat; catcall; catchup; catfish; cathode; catkins; catnaps; cattail; catwalk; caustic; cavalry; caveats; caviare; caviled; cavorts; cayenne; cedilla; celesta; cellist; cements; censure; centaur; centime; century; ceramic; cereals; cerebra; certify; chaffed; chagrin; chaises; chalets; chalice; chalked; chaotic; chapels; chaplet; charade; chariot; chasers; chassis; chateau; cheaply; checkup; cheddar; cheetah; cherish; cheroot; cherubs; chervil; chevron; chewers; chewier; chicest; chichis; chicory; chidden; chiefer; chiefly; chiffon; chigger; chignon; chimera; chimney; chintzy; chirrup; chisels; cholera; chowder; chronic; chuckle; chugged; chummed; churned; chutney; chutzpa; cigaret; cinemas; ciphers; circuit; cistern; citadel; citizen; civilly; clangor; clarets; clarion; classic; clayier; cleanse; cleanup; clerics; clerked; clients; climate; clinics; cliques; closely; closest; closets; coastal; cobwebs; cocaine; cochlea; cockade; cockily; cockney; cockpit; coconut; cocoons; codeine; codfish; codicil; coequal; coevals; coexist; coffins; cogency; cognacs; cognate; cohabit; cohorts; coiffed; coinage; colicky; colitis; collect; colleen; colloid; cologne; colored; colossi; colours; columns; comedic; comfier; commits; commode; commons; compact; company; compare; compass; compels; compile; complex; comrade; concave; concede; concise; concoct; concord; concurs; condemn; confabs; congaed; conifer; conjoin; conjure; connect; connive; connote; conquer; consign; consist; consume; contact; contain; contour; control; convict; convoke; coolant; coolest; copilot; copious; coppice; copycat; cordial; cordite; cordons; corncob; cornice; cornrow; corolla; corpora; corpses; corrals; correct; corrode; corrupt; corsage; corsair; cortege; cosigns; costars; costume; coterie; cottons; cougars; council; counsel; country; coupons; courage; courtly; cousins; coverts; cowbird; cowboys; cowgirl; cowhand; cowhide; cowlick; cowpoke; cowslip; coxcomb; coyness; coyotes; cozened; crackup; cranial; cravats; cravens; crayons; crazily; creator; creches; credits; creeper; cremate; creoles; cretins; crevice; crimson; cripple; crisply; critics; crochet; croquet; crouton; crowbar; crucial; crucify; crudely; crudest; crudity; crumbed; crunchy; crusade; crybaby; cryings; cryptic; crystal; cubical; cubists; cuckold; cuckoos; cudgels; cuisine; culotte; culprit; culvert; cumulus; cupcake; cupfuls; cupolas; cupsful; curates; curator; cursive; curtest; curtsey; cushion; cuspids; custody; customs; cutlass; cutlery; cutoffs; cyanide; cycling; cyclist; cyclone; cygnets; cymbals; cypress; dactyls; daemons; daffier; dahlias; damasks; dampest; damsels; damsons; dashiki; daubers; dauphin; daybeds; daytime; deadpan; deathly; debacle; debarks; debauch; debrief; debtors; debunks; decamps; decease; deceits; decency; decibel; decimal; declare; decorum; deejays; deepens; deepest; default; deficit; deflate; defraud; defrays; defrost; defunct; degrade; deicers; deicing; delight; delimit; deliria; deliver; delving; demagog; demeans; demerit; demesne; demigod; demoing; demonic; demurer; deniers; denizen; density; dentist; depicts; deplane; deplore; deploys; deposit; derange; derbies; derrick; dervish; deserts; desktop; despair; despoil; despots; dessert; destroy; detente; develop; deviate; devilry; devious; dewdrop; dewiest; dewlaps; diadems; diagram; dialect; dialled; dialogs; diamond; diaries; diarist; diatoms; diciest; dictate; dictums; diehard; diesels; dietary; dieters; dieting; diffuse; digital; digraph; dilemma; dimmest; dimness; dimwits; dinette; diocese; diorama; dioxide; dioxins; diploma; directs; disable; disarms; disavow; disband; disbars; discern; discuss; disdain; disease; disgust; dishpan; dishrag; dislike; dismays; dismiss; disobey; disowns; dispels; dispose; dispute; disrobe; disrupt; distaff; distant; distend; disturb; diurnal; divisor; divorce; divulge; dizzily; docents; doctors; doffing; dogfish; doggone; dogmata; dogtrot; dogwood; doleful; dollops; dolmens; dolphin; domains; dominos; doodads; doorway; dopiest; dorkier; dormant; dormers; dormice; dosages; doughty; dowager; dowdily; downers; drachma; dragnet; dragons; dragoon; drapery; drastic; drawers; dribble; driblet; driving; droller; droplet; dropout; drouths; drywall; dualism; dubiety; dubious; duchess; duchies; ductile; dugouts; dukedom; dullard; duodena; dustbin; duteous; dutiful; dwarfed; dwarves; dynamic; dynamos; dynasty; eagerer; eagerly; eaglets; earache; eardrum; earfuls; earldom; earlier; earlobe; earmark; earmuff; earnest; earplug; earshot; earthly; earwigs; easiest; eatable; ebonies; echelon; echoing; eclairs; ecology; economy; ecstasy; eddying; edgiest; edgings; edibles; edifice; edition; editors; educate; efforts; egghead; egoists; eighths; elation; elbowed; elderly; elector; elegant; elegiac; elegies; elevate; elevens; elicits; elision; elixirs; elusive; emailed; emanate; embalms; embargo; embarks; embassy; emblems; embrace; embroil; embryos; emerald; emetics; emigres; eminent; emirate; emoting; emotion; emotive; empathy; emperor; emporia; empower; emptily; emulate; enamels; enamors; enamour; encamps; enchant; encrypt; endears; endemic; endings; endives; endless; endowed; endways; endwise; enemata; enemies; enforce; engines; engorge; engrave; engross; engulfs; enhance; enigmas; enjoins; enjoyed; enlarge; enlists; enliven; ennoble; ensigns; ensnare; entails; entente; entered; enthral; enthuse; entitle; entombs; entrant; entraps; entreat; entropy; entwine; envelop; envious; envying; enzymes; epaulet; epicure; epigram; epilogs; episode; epistle; epitaph; epithet; epitome; epochal; epsilon; equator; equines; equinox; erasers; erasing; erasure; erectly; ermines; eroding; erosion; erosive; erotica; errands; erratas; erratic; erratum; erudite; erupted; eschews; escorts; escrows; espouse; espying; essence; estates; esteems; esthete; estuary; etchers; eternal; ethical; ethnics; eunuchs; euphony; evacuee; evading; evasion; evasive; evenest; evening; evicted; evident; eviller; evoking; exactly; examine; example; exceeds; excepts; excerpt; exclaim; exclude; execute; exempts; exerted; exhaust; exhibit; exigent; existed; exotics; expiate; explain; exploit; expound; expunge; extinct; extolls; extract; extreme; extrude; eyeball; eyebrow; eyefuls; eyelash; eyelets; eyelids; eyesore; fabrics; facades; faceted; facials; facings; factual; faculty; failure; fairway; falcons; fallacy; falloff; fallout; falsely; falsest; fanatic; fancily; fanfare; fantasy; fanzine; fashion; fatally; fathead; fathoms; fatigue; fatuous; faucets; feasted; feature; febrile; federal; fedoras; feebler; feedbag; felines; females; femoral; ferrets; ferrous; ferrule; fertile; fervour; festoon; fetlock; fetuses; fiascos; fibroid; fibrous; fickler; fifteen; fifties; filbert; filmier; finagle; finales; finally; finance; finesse; finicky; finises; firebug; firefly; firmest; firstly; fiscals; fishier; fishnet; fissure; fixable; fixedly; flaccid; flagons; flailed; flambes; flanges; flannel; flatcar; flattop; flaunts; flavors; flavour; floozie; florins; florist; flotsam; flounce; fluency; fluidly; flummox; flunkie; flyleaf; flyover; foghorn; foibles; foliage; fondant; fondest; foolery; foolish; footage; footsie; foppish; forbade; forbear; forbids; forbore; forceps; foreign; foreleg; foresaw; foresee; forests; forever; forfeit; forgoes; forgone; forlorn; formula; forsake; forsook; fortune; forward; forwent; fossils; foulest; foundry; fourths; foxhole; foxiest; foxtrot; fractal; fragile; frailty; framers; frankly; frantic; frappes; freckle; freedom; freeway; freight; frescos; fretful; fretted; friable; friends; frigate; frolics; frontal; frothed; fruited; fuchsia; fulcrum; fulfils; fulsome; funeral; fungous; funnily; furnace; furrier; further; furtive; fusible; fusions; fussily; fustian; fuzzily; gabbier; gadgets; gaffing; gainsay; gallant; galleon; gallery; gallium; gambits; gambols; gametes; gamiest; ganglia; gangway; gantlet; garbage; garland; garment; garrote; gaseous; gasohol; gastric; gateway; gaucher; gauchos; gaudily; gawkier; gawkily; gayness; gazebos; gazelle; gazette; gearbox; geckoes; geekier; geezers; geishas; gelatin; general; genital; genomes; genteel; gentian; gentile; genuine; geology; gerbils; germane; gerunds; gesture; getaway; geysers; gherkin; ghettos; ghosted; giddier; giddily; gigabit; gigolos; gimmick; gingham; gingkos; ginkgos; ginseng; giraffe; girders; girlish; gizzard; glacial; gleeful; glibber; glimpse; glinted; glisten; globule; glorify; glottis; glucose; gluiest; glutted; glutton; gnawing; gnomish; goatees; goblins; goddamn; godhood; godlier; godlike; godsend; godsons; goitres; golfers; gondola; goobers; goofier; gophers; gorilla; gosling; gospels; gougers; goulash; gourmet; goutier; governs; gradual; grammar; granary; grandad; grandly; granite; grannie; granola; granule; graphed; graphic; grapnel; grapple; gratify; gravies; gravity; greater; greatly; gremlin; grenade; greyish; griddle; griffin; grimace; gringos; grinned; gritted; groaned; grommet; grottos; grouchy; grounds; groupie; grownup; growths; groynes; gruffer; gruffly; gryphon; guarded; guffaws; guineas; guitars; gumdrop; gunboat; gunfire; gunshot; gunwale; gurneys; gutless; gutsier; gymnast; gypping; habitat; habitue; hackney; hacksaw; hafnium; haircut; hairdos; hairier; hairnet; hairpin; halberd; halcyon; halibut; halogen; halyard; hamlets; hamster; handcar; handful; handgun; handset; hangdog; hankies; hapless; happens; happily; harbors; harbour; hardtop; harelip; harlots; harmful; harmony; harness; harpist; harpoon; harsher; harshly; hashish; hatreds; haulers; hauteur; haycock; hayloft; haymows; hayseed; haywire; hazards; hazings; headset; headway; hearsay; heavily; hectare; heehaws; heftier; heifers; heinous; heiress; helical; hellion; hellish; helmets; helpers; helpful; hemline; hemlock; hennaed; henpeck; hepatic; heralds; herbage; heretic; heroism; herself; hertzes; hexagon; heydays; hibachi; hiccups; hickory; highboy; highway; hijacks; hillock; hilltop; himself; hippies; hirsute; history; hoagies; hoaxers; hobnail; hobnobs; hoedown; hoggish; hogwash; holdout; holdups; holiday; homages; homburg; homeboy; homonym; honesty; honored; honours; hoodlum; hookups; hopeful; horizon; hormone; horrify; horrors; hosanna; hosiery; hospice; hostile; hotbeds; hotcake; hothead; hotness; hottest; hoummos; howdahs; however; hubbubs; hubcaps; huffily; humaner; humanly; humbugs; humdrum; humerus; humidor; hundred; hurtful; husband; huskily; hussars; hutzpah; hyaenas; hybrids; hydrant; hydrate; hygiene; hymnals; hymning; hyphens; iambics; iceberg; icecaps; icicles; iciness; ideally; idiotic; idolise; idyllic; iffiest; igneous; iguanas; illegal; illicit; illness; imagery; imbuing; imitate; immoral; impairs; impasse; impeach; impends; imperil; impetus; impiety; impinge; impious; implant; impound; imprint; improve; impugns; impulse; impurer; inanely; inanest; inanity; inboard; inbreed; inbuilt; incisor; incline; include; incomes; incubus; indoors; indulge; inertia; inexact; infancy; infants; inferno; infidel; infield; informs; ingenue; ingrain; ingrate; ingress; ingrown; inherit; inhuman; initial; inkblot; inkling; inkwell; inmates; innings; inquest; inroads; insaner; inseams; insight; insigne; insipid; insists; insofar; insoles; inspect; inspire; instant; instead; insteps; insular; insulin; insults; intagli; intakes; integer; interim; intrude; intuits; invalid; inveigh; inverse; invoice; involve; ionizer; ipecacs; irately; iridium; irksome; islands; isobars; isolate; isotope; issuing; isthmus; italics; itchier; itemise; iterate; ivories; jackdaw; jackpot; jaguars; janitor; jasmine; javelin; jawbone; jaywalk; jazzier; jerkily; jerseys; jetties; jewelry; jiffies; jinxing; jitneys; jockeys; jocular; joiners; jointly; jollity; jonquil; journal; jousted; jubilee; jugular; juicers; juicier; juicing; jujubes; jukebox; juncoes; juniors; juniper; justest; justice; justify; karakul; karaoke; katydid; kayaked; keenest; keratin; kerbing; kestrel; ketchup; keyhole; keynote; keyword; kibbutz; kickoff; kidnaps; kidneys; killjoy; kiloton; kimonos; kindest; kinetic; kinfolk; kingdom; kingpin; kinship; kissers; kitchen; kitschy; klutzes; knavery; knavish; kneecap; kneeing; knifing; knights; knuckle; kookier; koshers; kowtows; krypton; labials; labours; lackeys; laconic; lacquer; lactate; lactose; ladings; ladling; ladybug; lagoons; lambast; lambent; lambkin; laments; lampoon; lamprey; languid; languor; lankier; lanolin; lantern; lanyard; laptops; larceny; largely; lariats; latency; latrine; lattice; laughed; laundry; laurels; lawless; lawsuit; laxness; layaway; layered; layette; layouts; layover; lazying; leaflet; leakage; lectern; lecture; leerier; leeward; lefties; legends; leggier; legless; legroom; legumes; legwork; leisure; lenient; lentils; leonine; leprosy; leprous; lesbian; letdown; lettuce; levying; lewdest; lexical; lexicon; liaison; liberty; libidos; library; liefest; liftoff; lignite; likable; limeade; limited; limpets; lindens; lingual; linnets; linseed; lintels; lioness; lionise; lipread; liqueur; liquids; liquors; lissome; listens; litchis; lithest; lithium; littler; liturgy; lockjaw; lockups; locusts; loftier; loftily; logbook; logical; logjams; longish; looneys; loosely; loosens; loosest; lotuses; loudest; loutish; louvers; lowbrow; lowdown; lowland; lowlier; lowness; loyaler; lozenge; luckily; luggage; lullaby; lumbago; lumpish; lunatic; lupines; lushest; lustful; lustily; lyceums; lyrical; macabre; macadam; machete; machine; macrame; madcaps; magenta; magical; magnate; magnify; magnums; magpies; mahatma; mahjong; mailbox; majesty; majored; majorly; makeups; malaise; malaria; maligns; mallard; malteds; mamboed; mammals; mammary; mammoth; manacle; manatee; mandate; manhole; manhood; manhunt; maniacs; manikin; mankind; mannish; mansard; mansion; mantels; mantras; manuals; manumit; marabou; maracas; marauds; marimba; marital; markups; marmots; maroons; marquee; marquis; marshal; martyrs; marvels; mascara; mascots; masonic; masonry; masseur; mastiff; mastoid; matador; matinee; mattock; matzohs; matzoth; maudlin; maxilla; maximal; maximum; mayoral; maypole; mazurka; meadows; meander; measles; measure; medians; mediate; medical; mediums; medleys; medulla; meekest; megaton; melange; melanin; melodic; members; memento; memoirs; menfolk; menorah; menthol; mention; mentors; meowing; mercies; mercury; mergers; merinos; merited; mermaid; merrily; mescals; messiah; messily; mestizo; meteors; methane; methods; metiers; metrics; mewling; miaowed; miasmas; microbe; midland; midmost; midriff; midterm; midtown; midways; midweek; midwife; midyear; migrant; migrate; mildews; militia; milksop; mimetic; mimicry; mimosas; minaret; mindful; mineral; minibus; minicam; minimal; minimum; minivan; minored; minuend; minuets; minutia; miracle; mirages; mirrors; miscall; miscast; misdeal; misdeed; misdoes; misdone; miserly; misfire; misfits; mishaps; mislaid; mislays; misrule; missals; misstep; mistake; mistily; mistime; mistook; mistype; mitosis; mitring; mizzens; moderns; modesty; modicum; moistly; molests; mollify; mollusc; monarch; mongrel; moniker; monitor; monocle; monolog; monsoon; montage; monthly; moodily; moonlit; moppets; moraine; morally; mordant; morgues; morocco; moronic; morsels; mosaics; motleys; motlier; motored; mousers; mouthed; muezzin; mukluks; mulatto; mullahs; mummify; mundane; murders; murkily; murmurs; museums; musical; musings; muskets; muskrat; mussels; mustang; mutable; mutants; muumuus; mynahes; myriads; myrtles; mystics; mystify; naiades; naivest; nakedly; napalms; naphtha; napkins; narrate; narwhal; nasally; nascent; natural; nautili; necktie; neglect; negligs; neither; neonate; nephews; nervous; network; neurons; neuters; neutral; neutron; newbies; newborn; newness; newsboy; newsier; newtons; nexuses; nickels; niftier; niggard; nightie; ninepin; nirvana; nitpick; nitrate; nitwits; noblest; noggins; noisier; noisily; noisome; nomadic; nominal; nominee; noncoms; nonplus; nonskid; nonstop; nonuser; nonzero; noonday; nosegay; nostril; notepad; nourish; novelty; nowhere; noxious; nuclear; nucleic; nucleus; nudists; nuggets; numbing; numeral; numeric; nuncios; nuptial; nursery; nurture; nutmeat; nutmegs; nutrias; oatmeal; obelisk; obesity; obeying; objects; oblique; oblongs; obloquy; oboists; obscene; obscure; obsequy; observe; obtains; obtrude; obtuser; obverse; obviate; obvious; ocarina; occlude; oceanic; ocelots; octagon; octaves; octette; octopus; oculars; oculist; oddball; oddness; odorous; odyssey; offbeat; offends; offered; offhand; offings; offload; offsets; offside; oftener; oilskin; omelets; ominous; omnibus; oneness; onerous; oneself; onetime; ongoing; opacity; openers; openest; operand; opiates; opinion; opossum; oppress; optimum; options; opulent; oracles; orbital; orbited; orchard; orchids; ordains; ordeals; ordered; orderly; ordinal; oregano; organic; orgasms; orients; orifice; origami; origins; orioles; orotund; orphans; osmosis; osmotic; ospreys; ostrich; ottoman; outages; outbids; outcome; outcrop; outdone; outdoor; outings; outlaid; outlook; outplay; outpost; outputs; outrage; outrank; outruns; outsell; outsold; outstay; outtake; outvote; outward; outwear; ovarian; ovaries; overact; overall; overdid; overdue; overeat; overjoy; overlie; oversaw; oversee; overtax; overtly; overuse; oviduct; ovulate; oxfords; oxidise; oxymora; pacific; package; pageant; pagodas; palatal; palaver; palette; palmist; palpate; panacea; panache; pancake; panicky; panoply; panther; papayas; papilla; papoose; paprika; papyrus; paradox; paragon; parapet; parasol; parboil; parcels; parfait; pariahs; parlors; parlour; parquet; parsnip; partake; partner; partook; parvenu; paschal; passion; passkey; pastime; patella; pathway; patient; patriot; paucity; pawpaws; payload; payment; payroll; peacock; peafowl; peahens; peanuts; pearled; peasant; peccary; pedagog; pedants; pedlars; peerage; peevish; peewees; pelagic; pelican; penalty; penance; pencils; penguin; penises; penlite; pennons; pensive; peonage; peppier; peptics; percale; percent; perfect; perfidy; perform; perfume; perhaps; perigee; periods; periwig; permute; perplex; persist; pertest; perturb; perusal; pervade; pervert; pesetas; petiole; petites; petrels; petrify; pettily; petunia; phalanx; phallic; phallus; phantom; pharaoh; pharynx; philtre; phloxes; phoebes; phoenix; phoneme; phoneys; phoning; photoed; phrasal; physics; pianist; piazzas; piccolo; pickaxe; pickups; picnics; picture; pidgins; piebald; piecing; piggish; piglets; pigpens; pigskin; pigtail; pilaffs; pileups; pilfers; pilgrim; pillars; pillbox; pillory; pimento; pinball; pincers; pinhead; pinhole; pinkeye; pinkish; pinnate; pintoes; pioneer; piously; piquant; piquing; piranha; piteous; pitfall; pithier; pithily; pitiful; pivotal; pizzazz; placard; placate; placebo; placket; plainly; plaints; planets; plateau; platens; platoon; platypi; plaudit; playact; playboy; playful; playoff; playpen; plectra; plenary; pliable; pliancy; plinths; plugins; plumage; pluming; plurals; plusses; plywood; podcast; podiums; poetess; pogroms; polecat; polemic; politer; politic; polkaed; pollute; polygon; polymer; poniard; pontiff; pontoon; poorest; popcorn; popguns; poplars; popover; popular; porcine; portico; portion; portray; poseurs; poshest; posited; possess; possums; postbox; postdoc; postwar; potency; potfuls; pothole; pothook; potluck; poultry; poverty; powwows; prairie; praline; prattle; prawned; preachy; precede; precept; predict; preempt; prefabs; preface; prefect; prefers; preheat; prelude; premier; premium; prepaid; prepare; prepays; preppie; prequel; presage; presets; preside; prestos; presume; preteen; pretend; pretext; pretzel; prevail; preview; prevues; priests; primers; prithee; probity; problem; proceed; proctor; procure; prodigy; proffer; profile; profits; profuse; progeny; program; prologs; prolong; promote; prompts; pronoun; proofed; propels; prophet; propose; prosaic; prosody; protege; prouder; proudly; proverb; provide; proviso; provoke; provost; proxies; prudent; prudery; prudish; pruning; psychic; puberty; publish; puckish; pudgier; pueblos; puerile; pullout; pulpier; pulpits; pulsars; pulsate; pumices; pundits; pungent; punster; puppets; puritan; purloin; purport; purpose; pursers; pursuit; purview; pushups; pustule; putrefy; pyramid; pythons; quacked; quaffed; quahaug; quahogs; quailed; quaking; quantum; quarrel; quartos; quasars; queuing; quibble; quiches; quickie; quickly; quietly; quietus; quinces; quinine; quintet; quipped; quirked; quoited; quondam; quorums; quoting; rabbits; raccoon; racemes; raceway; racoons; racquet; radials; radiant; radiate; radical; radioed; raffish; rafters; raggedy; raglans; ragouts; ragtags; ragtime; ragweed; raiders; railway; raiment; rainbow; rainier; rampage; ramrods; rancour; ransack; rapider; rapidly; rapport; rascals; rashest; raspier; rattans; rattrap; raucous; ravened; ravioli; rawhide; rawness; readily; readmit; readout; reagent; realign; reality; reapply; rearmed; rebirth; rebuffs; recalls; receipt; recheck; recital; recluse; recoils; recoups; recruit; rectify; rectums; recycle; redcaps; redcoat; reddens; reddest; reddish; redeems; redhead; redneck; redoing; redoubt; redraft; redskin; redwood; reefers; reenact; reenter; reentry; referee; refocus; refresh; refuels; refunds; refusal; regalia; regatta; regency; regroup; regular; reissue; rejoice; rejoins; relabel; relapse; relearn; release; reliant; reloads; remarks; remarry; rematch; remnant; remodel; remorse; removal; renewal; rentals; reoccur; reopens; reorder; repairs; replace; replays; replica; reprise; reproof; reprove; reptile; repulse; requiem; rereads; reroute; rescind; residue; respond; restart; restock; restore; restudy; results; retools; retouch; retrial; returns; reunify; reunion; reunite; revamps; revelry; reviews; revisit; revival; revolts; rhizome; rhodium; rhombus; rhubarb; rhyming; rhythms; richest; ricksha; ricotta; rigidly; rigours; ringlet; rioters; riotous; ripened; riposte; ripsaws; riskier; rituals; ritzier; rivalry; riveted; rivulet; roadbed; roadway; robotic; rodents; roebuck; rogered; roguery; rollick; romaine; romance; rompers; romping; rooftop; roomful; roomier; rosebud; rosined; rotunda; roundup; rowboat; roweled; rubbish; rubella; rubiest; rubrics; rudders; ruffian; ruinous; rulings; rummage; runaway; runoffs; runways; rustics; sackful; sadists; safaris; saffron; saguaro; salaams; salamis; saltest; saltier; salvoes; sambaed; samovar; sampans; samurai; sanctum; sandbox; sandhog; sandlot; sarcasm; sarcoma; sardine; sarongs; sashays; satanic; satchel; satiate; satiety; satires; satisfy; satraps; saucers; saucier; saucily; saucing; saunaed; sausage; sauteed; savanna; savants; saviors; saviour; sawdust; sawmill; scabies; scalars; scalene; scandal; scapula; scarabs; scarify; scenery; sceptic; sceptre; schisms; schlock; schmalz; schmuck; scholar; schools; schrods; schtick; sciatic; science; scissor; sconces; scorned; scotchs; scourge; scowled; scratch; scrawny; screech; screens; scribes; scripts; scrooge; scrotum; scrunch; scruple; scubaed; sculled; sculpts; scumbag; scupper; seabeds; seabird; seafood; sealant; seamier; seaport; seasick; seaside; seaward; seaways; seaweed; seclude; seconds; secrecy; secular; seeings; seekers; seepage; seesaws; segment; seismic; seizing; seizure; selects; selfish; sellout; seltzer; senator; sensual; septums; sequels; sequins; sequoia; serener; serfdom; serious; sermons; serpent; servant; servers; sesames; several; sexiest; sexists; sexless; sexpots; sextant; sextons; shackle; shakeup; shakily; shamans; shamble; shampoo; shapely; sharply; shebang; shekels; shellac; sherbet; sheriff; shields; shindig; shingle; shlepps; shlocky; shoaled; shodden; shoguns; shortly; shotgun; shovels; showbiz; showily; showoff; shrouds; shticks; shudder; shuteye; shutout; shyster; sickbed; sickens; sickest; sidearm; sierras; sieving; signals; silence; silents; silicon; simians; similar; similes; sincere; sinuous; sirloin; sirocco; sitcoms; situate; sixteen; sixties; sizable; skaters; sketchy; skewers; skidded; skilful; skycaps; skyjack; skylark; skyline; skyward; slaloms; slavish; sleazes; sleekly; sleeves; sleighs; sleuths; slogans; slouchy; slovens; slowest; smaller; smartly; smitten; smokier; smolder; smooths; smother; snidest; snipers; snorkel; soapbox; soberly; socials; society; softens; softest; soggily; soirees; sojourn; solaria; solicit; solider; solidly; soloist; solvent; somehow; someone; sonatas; sonnies; soonest; sootier; soprano; sorbets; sorcery; sorghum; sorrels; sottish; soulful; soupcon; soviets; soybean; spandex; spangle; spaniel; sparely; sparest; sparkle; sparrow; spartan; spastic; spatula; species; specify; speckle; speedup; spheres; spigots; spinach; spinets; spinoff; spiraea; spirits; spittle; splashy; spleens; splodge; splotch; splurge; sponsor; sporran; spouses; spreads; sprites; sprouts; spuming; squalid; squalls; squalor; squawks; squeeze; squelch; stadium; staider; staidly; stained; stalest; stamens; stamina; standby; stanzas; starchy; stardom; starkly; startle; stately; station; statues; staunch; stealth; stellar; stencil; stepson; stereos; sterile; sterner; sternly; sternum; steroid; steward; stickup; stiffly; stigmas; stimuli; stipend; stipple; stirrup; stoical; stomach; stonier; stonily; stooges; stopgap; storage; storeys; stouter; stoutly; strands; strange; stratum; streets; stretch; strophe; strudel; stuccos; student; stupefy; stupids; stupors; styptic; suavely; suavest; suavity; subhead; subject; subjoin; sublime; suborns; subplot; subsist; subsoil; subsume; subteen; subtler; suburbs; subvert; subways; succeed; success; succour; succumb; sucrose; sudsier; suffice; suffuse; sugared; suggest; suicide; suitors; sulfate; sulfide; sulfurs; sulkily; sulphur; summons; sunbeam; sunburn; sundaes; sundial; sunfish; sunlamp; sunless; sunrise; sunroof; sunspot; suppers; suppler; support; suppose; supreme; surface; surfeit; surgery; surmise; surname; surpass; surplus; surreal; survive; suspect; suspend; sustain; swarmed; swarthy; sweetie; sweetly; swiftly; swinish; swollen; syllabi; symbols; symptom; synagog; synapse; syncing; synergy; synonym; syringe; systems; tableau; tablets; tabloid; tabooed; tacitly; tactful; tactics; tactile; tadpole; taffeta; takeoff; takeout; talents; tallest; tallyho; tamales; tandems; tangelo; tangent; tankard; tankful; tantrum; tapioca; targets; tariffs; tarmacs; tattoos; tawnier; taxicab; teacups; teapots; teargas; tearoom; teatime; teazles; tedious; teenage; teenier; teepees; temblor; tempest; temples; tenable; tenancy; tenants; tendons; tendril; tenfold; tenoned; tenpins; tensile; tenuous; tequila; terabit; termite; terrace; terrain; terrify; terrors; tetanus; tethers; textile; textual; texture; thalami; thanked; thawing; theatre; theists; theorem; therapy; thereto; thermal; thermos; thiamin; thickly; thimble; thirdly; thorium; thought; through; thrower; thrusts; thruway; thudded; thunder; thwacks; thwarts; thyroid; thyself; tidying; timbres; timider; timidly; timpani; tinfoil; tinsels; tipsily; tirades; tireder; tissues; titanic; titbits; titmice; titular; tobacco; tocsins; toehold; toenail; tomboys; tomcats; tonight; tonnage; tonsils; tonsure; toolbar; toolbox; toolkit; topazes; topcoat; topknot; topless; topside; tornado; torpedo; torsion; torture; tossups; totally; totemic; toucans; toupees; towhead; towpath; trachea; traduce; traffic; tragedy; traipse; trample; transit; transom; trapeze; traumas; travail; treason; treetop; trefoil; trekked; trellis; tremble; tremolo; tremors; trended; triceps; trident; trigger; trilogy; trinity; trinket; tripods; trisect; tritely; tritest; triumph; trivial; trochee; trodden; troikas; trollop; tropics; tropism; trouble; troughs; trounce; trowels; truancy; truants; truffle; truisms; trundle; tryouts; tsunami; tubbier; tufting; tugboat; tuition; tumults; tundras; tuneful; turbans; turbine; turbots; tureens; turkeys; turmoil; turnips; turnkey; turnoff; turrets; tussock; tutored; tuxedos; tweaked; twelfth; twelves; twining; twinkle; twofers; twofold; twosome; tycoons; tympana; typeset; typhoid; typhoon; typists; tyranny; tyrants; ugliest; ululate; umbrage; umlauts; umpteen; unaided; unarmed; unasked; unaware; unblock; unbolts; unbosom; uncanny; uncivil; unclasp; uncoils; uncorks; uncouth; uncover; unction; undergo; undress; unearth; uneaten; unequal; unfrock; unfunny; unfurls; ungodly; unguent; unhands; unhappy; unheard; unhinge; unhitch; unhooks; unhorse; unicorn; uniform; uniquer; unitary; uniting; unkempt; unknown; unlatch; unlearn; unleash; unloads; unlocks; unloose; unlucky; unmakes; unmanly; unmasks; unmoral; unnerve; unpacks; unpaved; unplugs; unquote; unravel; unready; unriper; unsafer; unscrew; unsnaps; unsnarl; unstops; unstuck; untried; untruer; untruth; untwist; unusual; unveils; unwiser; unwraps; upbeats; upbraid; upchuck; upended; upfront; upgrade; uphills; upholds; uplands; uplifts; upraise; uproars; uproots; upscale; upshots; upsides; upstart; upsurge; upswing; uptakes; upturns; upwards; urbaner; urchins; urethra; urgency; urinals; urinary; urinate; urology; useable; useless; ushered; usually; usurers; utensil; uterine; utilise; utility; uttered; utterly; uvulars; vacancy; vaccine; vacuity; vacuous; vacuums; vagrant; vaguely; vaguest; valeted; validly; valises; vamoose; vampire; vanilla; vapours; variate; variety; various; varlets; varmint; varsity; varying; vassals; veggies; velours; velvety; venally; venison; veranda; verbals; verbena; verbose; verdant; verdict; verdure; versify; version; vertigo; vespers; vessels; vestige; veteran; viaduct; vibrant; viceroy; vicious; victims; vicunas; viewers; viewing; vinegar; vintner; violate; violent; violets; violins; violist; viragos; virgins; virgule; virtues; viruses; visages; visaing; viscera; viscous; visions; visited; visitor; visuals; vitally; vitamin; vitiate; vitriol; viziers; vocalic; volcano; voltage; voltaic; volumes; vomited; voyeurs; waggish; wagoner; wakeful; wakened; walkout; walkway; wallaby; walleye; walnuts; wannabe; wapitis; warhead; warlike; warlord; warpath; warrant; warrior; warthog; wartier; wartime; washout; washtub; waspish; wassail; wastrel; wavelet; waxwing; waxwork; waylaid; waylays; wayside; wayward; weakens; weakest; weapons; wearily; webbing; website; wedlock; weekday; weekend; weevils; weirder; weirdly; weirdos; welcome; welfare; western; wetland; wettest; whacked; whalers; wharves; whatnot; wheaten; wheedle; whetted; whiffed; whimsey; whiskys; whitens; whitest; whitish; whoever; widgeon; wildcat; willful; windbag; windier; windups; wingtip; winsome; wiretap; without; wittier; wittily; wolfish; wolfram; womanly; woodcut; woofers; woolens; woollen; workday; workers; workout; worldly; worsens; worsted; wraiths; wrangle; written; wrongly; yachted; yardage; yardarm; yeshiva; yoghurt; yogurts; younger; yttrium; zaniest; zeniths; zephyrs; zeroing; zigzags; zincked; zinnias; zircons; zodiacs; zombies; zoology; zygotes'"
+ ]
+ },
+ "execution_count": 46,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "'; '.join(sorted(list(r)[0] for r in reachables if len(r) == 1))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "for a in reachables:\n",
+ " for b in reachables:\n",
+ " if a != b:\n",
+ " if not a.isdisjoint(b):\n",
+ " print(a, b)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "# longest_chain = []\n",
+ "# with open('all-chains-4.txt', 'w', 1) as f:\n",
+ "# for ws in reachables:\n",
+ "# for s in ws:\n",
+ "# for t in ws:\n",
+ "# if s < t:\n",
+ "# chain = astar_search(s, t)\n",
+ "# if chain:\n",
+ "# f.write('{}\\n'.format(chain))\n",
+ "# if len(chain) > len(longest_chain):\n",
+ "# longest_chain = chain\n",
+ "\n",
+ "# longest_chain"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "bigset = max(reachables, key=len)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "['galling', 'gelling', 'selling', 'sealing', 'scaling', 'scaring']\n",
+ "['raining', 'railing', 'tailing', 'tabling', 'tabbing', 'gabbing', 'gobbing', 'bobbing', 'bobbins', 'bobbies', 'bobbles', 'babbles', 'gabbles', 'garbles', 'gargles', 'gaggles', 'giggles', 'wiggles']\n",
+ "['blowing', 'flowing', 'flawing', 'flaking', 'slaking', 'soaking', 'socking', 'sacking', 'tacking', 'tasking']\n",
+ "['bumbled', 'bubbled', 'bobbled', 'bobbles', 'bobbies', 'bobbins', 'bobbing', 'boobing', 'booting', 'boating', 'beating', 'beading', 'bending', 'pending']\n",
+ "['felling', 'belling', 'belting', 'bolting', 'booting', 'boobing', 'bobbing', 'bobbins', 'bobbies', 'bobbles', 'bubbles', 'burbles', 'burgles', 'bungles', 'bangles', 'tangles', 'tingles', 'tinkles', 'tickles']\n",
+ "['hurdled', 'huddled', 'huddles', 'puddles', 'paddles', 'paddies', 'daddies', 'dandies', 'dandier', 'handier', 'hardier', 'tardier', 'tarrier', 'terrier', 'tearier']\n",
+ "['seeding', 'sending', 'rending', 'renting', 'ranting', 'ratting', 'hatting']\n",
+ "['muddled', 'fuddled', 'fiddled', 'riddled']\n",
+ "['canting', 'casting', 'basting', 'besting', 'beating', 'bearing', 'fearing']\n",
+ "['furling', 'fulling', 'felling', 'selling', 'sealing', 'searing', 'gearing', 'glaring', 'glazing']\n",
+ "['bracing', 'gracing', 'grading', 'goading', 'loading', 'leading', 'leaking', 'peaking', 'peeking', 'peeping']\n",
+ "['rallied', 'dallied', 'dallies', 'dollies', 'collies', 'coolies', 'cookies', 'bookies', 'boobies', 'bobbies', 'bobbins', 'bobbing', 'boobing', 'booting', 'rooting', 'rioting', 'rifting']\n",
+ "['sorting', 'porting', 'potting', 'pitting', 'hitting']\n",
+ "['halving', 'halting', 'hatting', 'hitting', 'hinting', 'hinging', 'tinging']\n",
+ "['warping', 'warring', 'barring', 'barbing', 'garbing', 'gabbing', 'gobbing', 'bobbing', 'bobbins', 'bobbies', 'bobbles', 'bubbles', 'burbles', 'burgles', 'bungles', 'bangles', 'dangles', 'dandles', 'dandies', 'daddies', 'paddies', 'paddles', 'puddles', 'huddles', 'hurdles', 'hurtles', 'hustles', 'hustler', 'rustler', 'rustier', 'mustier', 'mussier', 'mossier']\n",
+ "['warding', 'carding', 'carting', 'parting', 'patting', 'putting']\n",
+ "['hawking', 'hacking', 'hocking', 'hooking', 'booking', 'boobing', 'bobbing', 'bobbins', 'bobbies', 'bobbles', 'bubbles', 'burbles', 'burgles', 'bungles', 'bangles', 'dangles', 'dandles', 'dandies', 'dandier', 'handier', 'hardier', 'tardier', 'tarrier', 'tarries', 'parries', 'parties', 'patties', 'potties', 'potpies', 'poppies', 'puppies']\n",
+ "['hussies', 'huskies', 'huskier', 'duskier', 'dustier', 'rustier', 'rustler', 'hustler', 'hustles', 'hurtles', 'hurdles', 'huddles', 'puddles', 'paddles', 'paddies', 'daddies', 'dandies', 'dandles', 'dangles', 'wangles', 'waggles', 'wiggles', 'wiggler']\n",
+ "['gonging', 'bonging', 'bonding', 'bending', 'beading', 'bearing', 'searing', 'sparing', 'spacing', 'spicing', 'slicing', 'sliding', 'eliding', 'eluding', 'exuding']\n",
+ "['locking', 'lucking', 'bucking', 'bulking', 'bulling', 'fulling', 'furling', 'furlong']\n"
+ ]
+ }
+ ],
+ "source": [
+ "for _ in range(20):\n",
+ " start, goal = random.sample(bigset, 2)\n",
+ " print(astar_search_closed(start, goal))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{2: [['soggier', 'doggier'],\n",
+ " ['bashing', 'hashing'],\n",
+ " ['growing', 'groping'],\n",
+ " ['gulling', 'pulling']],\n",
+ " 3: [['middles', 'cuddles'],\n",
+ " ['staring', 'snoring'],\n",
+ " ['lashing', 'wishing'],\n",
+ " ['reeking', 'peeping']],\n",
+ " 4: [['mulling', 'welling'],\n",
+ " ['seeding', 'peering'],\n",
+ " ['diddled', 'meddled'],\n",
+ " ['wiggler', 'wangled']],\n",
+ " 5: [['yapping', 'bailing'],\n",
+ " ['seating', 'pitying'],\n",
+ " ['budging', 'gorging'],\n",
+ " ['mailing', 'footing']],\n",
+ " 6: [['mooring', 'polling'],\n",
+ " ['lapping', 'pocking'],\n",
+ " ['rooking', 'slating'],\n",
+ " ['palling', 'yucking']],\n",
+ " 7: [['polling', 'funding'],\n",
+ " ['showing', 'jetting'],\n",
+ " ['gonging', 'kenning'],\n",
+ " ['tarring', 'tinting']],\n",
+ " 8: [['gabbing', 'fudging'],\n",
+ " ['rubbing', 'forking'],\n",
+ " ['zooming', 'railing'],\n",
+ " ['humping', 'fouling']],\n",
+ " 9: [['soloing', 'gadding'],\n",
+ " ['reefing', 'denying'],\n",
+ " ['huffing', 'gearing'],\n",
+ " ['gabbing', 'tensing']],\n",
+ " 10: [['touting', 'bumming'],\n",
+ " ['loafing', 'kissing'],\n",
+ " ['destiny', 'lording'],\n",
+ " ['styling', 'dogging']],\n",
+ " 11: [['bagging', 'booties'],\n",
+ " ['woolies', 'dooming'],\n",
+ " ['whining', 'termini'],\n",
+ " ['trading', 'fibbing']],\n",
+ " 12: [['tangier', 'boggles'],\n",
+ " ['hubbies', 'bonding'],\n",
+ " ['minting', 'boobies'],\n",
+ " ['sagging', 'bobbled']],\n",
+ " 13: [['bandies', 'battier'],\n",
+ " ['woodies', 'muggier'],\n",
+ " ['pinning', 'cobbles'],\n",
+ " ['pegging', 'bobbled']],\n",
+ " 14: [['cobbles', 'humming'],\n",
+ " ['rustler', 'dawdler'],\n",
+ " ['tumbler', 'jarring'],\n",
+ " ['wobbled', 'milking']],\n",
+ " 15: [['gambles', 'spacing'],\n",
+ " ['willies', 'bungled'],\n",
+ " ['hugging', 'mumbles'],\n",
+ " ['bidding', 'gambler']],\n",
+ " 16: [['sillies', 'pooping'],\n",
+ " ['cussing', 'mumbled'],\n",
+ " ['gushing', 'gambled'],\n",
+ " ['bundles', 'tasking']],\n",
+ " 17: [['singled', 'hostler'],\n",
+ " ['horsing', 'wiggles'],\n",
+ " ['bullies', 'parking'],\n",
+ " ['handing', 'woodies']],\n",
+ " 18: [['tickles', 'fouling'],\n",
+ " ['toggles', 'bidding'],\n",
+ " ['besting', 'soldier'],\n",
+ " ['joining', 'toggles']],\n",
+ " 19: [['masking', 'jiggled'],\n",
+ " ['birdied', 'boogies'],\n",
+ " ['mantled', 'praying'],\n",
+ " ['hillier', 'hatting']],\n",
+ " 20: [['rapping', 'sulkier'],\n",
+ " ['candied', 'pasting'],\n",
+ " ['singled', 'longing'],\n",
+ " ['sillier', 'peeving']],\n",
+ " 21: [['sighing', 'dailies'],\n",
+ " ['sickles', 'begging'],\n",
+ " ['piggies', 'humbler'],\n",
+ " ['bawling', 'paddies']],\n",
+ " 22: [['tardier', 'rolling'],\n",
+ " ['judging', 'bandies'],\n",
+ " ['tardier', 'letting'],\n",
+ " ['tasking', 'rangier']],\n",
+ " 23: [['kicking', 'diddles'],\n",
+ " ['dawning', 'bulgier'],\n",
+ " ['pedaled', 'felting'],\n",
+ " ['piddled', 'jetting']],\n",
+ " 24: [['veining', 'cockles'],\n",
+ " ['forcing', 'biggies'],\n",
+ " ['gauging', 'boggier'],\n",
+ " ['kenning', 'hardier']],\n",
+ " 25: [['palmier', 'husking'],\n",
+ " ['toddles', 'healing'],\n",
+ " ['middies', 'burping'],\n",
+ " ['bobbled', 'dossier']],\n",
+ " 26: [['middies', 'mushing'],\n",
+ " ['buckled', 'smoking'],\n",
+ " ['tearier', 'gracing'],\n",
+ " ['hitting', 'doggies']],\n",
+ " 27: [['wearier', 'gonging'],\n",
+ " ['farming', 'hurtled'],\n",
+ " ['tinging', 'merrier'],\n",
+ " ['basting', 'hustled']],\n",
+ " 28: [['chasing', 'buddies'],\n",
+ " ['pigmies', 'huffing'],\n",
+ " ['veining', 'hustles'],\n",
+ " ['manning', 'wearies']],\n",
+ " 29: [['bulking', 'patsies'],\n",
+ " ['bustled', 'pending'],\n",
+ " ['rustles', 'slewing'],\n",
+ " ['tattles', 'doggies']],\n",
+ " 30: [['tarring', 'dustier'],\n",
+ " ['hostler', 'glowing'],\n",
+ " ['battier', 'flaming'],\n",
+ " ['singing', 'potties']],\n",
+ " 31: [['nuttier', 'packing'],\n",
+ " ['bumping', 'potpies'],\n",
+ " ['wagging', 'testier'],\n",
+ " ['gushier', 'crazing']],\n",
+ " 32: [['fattier', 'signing'],\n",
+ " ['testing', 'tattler'],\n",
+ " ['bossier', 'belying'],\n",
+ " ['curling', 'gushier']],\n",
+ " 33: [['tattled', 'soiling'],\n",
+ " ['mintier', 'milling'],\n",
+ " ['tacking', 'dossier'],\n",
+ " ['bagging', 'yuckier']],\n",
+ " 34: [['wattled', 'mending'],\n",
+ " ['yuppies', 'dogging'],\n",
+ " ['dunging', 'rattled'],\n",
+ " ['tattled', 'seeming']],\n",
+ " 35: [['wattles', 'rigging'],\n",
+ " ['routine', 'motiles'],\n",
+ " ['pussies', 'lathing'],\n",
+ " ['lousier', 'staling']],\n",
+ " 36: [['wattles', 'chasing'],\n",
+ " ['motiles', 'orating'],\n",
+ " ['chafing', 'mintier'],\n",
+ " ['mottles', 'dulling']],\n",
+ " 37: [['keeling', 'mottles'],\n",
+ " ['yuckier', 'rimming'],\n",
+ " ['cupping', 'motives'],\n",
+ " ['bottled', 'scoping']],\n",
+ " 38: [['mobiles', 'girting'],\n",
+ " ['motiles', 'fencing'],\n",
+ " ['motives', 'sitting'],\n",
+ " ['killing', 'motives']],\n",
+ " 40: [['mossier', 'noising'],\n",
+ " ['mobiles', 'jeering'],\n",
+ " ['scoping', 'mobiles'],\n",
+ " ['revving', 'mottoes']]}"
+ ]
+ },
+ "execution_count": 52,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "solutions = {}\n",
+ "for _ in range(10000):\n",
+ " start, goal = random.sample(bigset, 2)\n",
+ " solution = astar_search_closed(start, goal)\n",
+ " sl = len(solution)\n",
+ " if sl not in solutions:\n",
+ " solutions[sl] = []\n",
+ " if len(solutions[sl]) < 4:\n",
+ " solutions[sl].append([start, goal])\n",
+ " \n",
+ "# if len(solution) >= 10:\n",
+ "# solutions += [solution]\n",
+ " \n",
+ "solutions"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 74,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{31: [['pupping', 'lustier'],\n",
+ " ['eloping', 'pastier'],\n",
+ " ['daisies', 'poppies'],\n",
+ " ['dossier', 'tattled'],\n",
+ " ['betting', 'murkier']],\n",
+ " 32: [['getting', 'mossier'],\n",
+ " ['busting', 'guppies'],\n",
+ " ['mussier', 'staring'],\n",
+ " ['coifing', 'murkier'],\n",
+ " ['massing', 'cattier']],\n",
+ " 33: [['cattier', 'signing'],\n",
+ " ['mousier', 'bulling'],\n",
+ " ['tattles', 'railing'],\n",
+ " ['rattler', 'tensing'],\n",
+ " ['guppies', 'peeking']],\n",
+ " 34: [['tattled', 'sparing'],\n",
+ " ['darting', 'bushier'],\n",
+ " ['dunning', 'tattled'],\n",
+ " ['rattles', 'deeding'],\n",
+ " ['girting', 'luckier']],\n",
+ " 35: [['goading', 'battles'],\n",
+ " ['rattles', 'griping'],\n",
+ " ['jerkins', 'rattled'],\n",
+ " ['wattled', 'pegging'],\n",
+ " ['mintier', 'damming']],\n",
+ " 36: [['dotting', 'motives'],\n",
+ " ['foiling', 'motives'],\n",
+ " ['bottles', 'missing'],\n",
+ " ['hussies', 'hulking'],\n",
+ " ['letting', 'mottoes']],\n",
+ " 37: [['exuding', 'fattier'],\n",
+ " ['tinting', 'mottoes'],\n",
+ " ['bottled', 'temping'],\n",
+ " ['mobiles', 'bending'],\n",
+ " ['gushier', 'prising']],\n",
+ " 38: [['mobiles', 'walking'],\n",
+ " ['motives', 'furring'],\n",
+ " ['bottled', 'yessing'],\n",
+ " ['bottled', 'griming'],\n",
+ " ['wormier', 'motives']],\n",
+ " 39: [['mottoes', 'reeving'],\n",
+ " ['guiding', 'pussier'],\n",
+ " ['pricing', 'cashier'],\n",
+ " ['messier', 'arising'],\n",
+ " ['playing', 'mobiles']],\n",
+ " 40: [['kissing', 'motives'],\n",
+ " ['atoning', 'motives'],\n",
+ " ['mossier', 'noising'],\n",
+ " ['bottled', 'pricing']],\n",
+ " 41: [['priding', 'mottled']],\n",
+ " 42: [['eliding', 'mottoes']]}"
+ ]
+ },
+ "execution_count": 74,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "solutions = {}\n",
+ "for _ in range(10000):\n",
+ " start, goal = random.sample(bigset, 2)\n",
+ " solution = astar_search_closed(start, goal)\n",
+ " if not solution:\n",
+ " solution = astar_search_closed(goal, start)\n",
+ " sl = len(solution)\n",
+ " if sl > 30:\n",
+ " if sl not in solutions:\n",
+ " solutions[sl] = []\n",
+ " if len(solutions[sl]) < 5:\n",
+ " solutions[sl].append([start, goal])\n",
+ " \n",
+ "# if len(solution) >= 10:\n",
+ "# solutions += [solution]\n",
+ " \n",
+ "solutions"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 75,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "solutions = {31: [['pupping', 'lustier'],\n",
+ " ['eloping', 'pastier'],\n",
+ " ['daisies', 'poppies'],\n",
+ " ['dossier', 'tattled'],\n",
+ " ['betting', 'murkier']],\n",
+ " 32: [['getting', 'mossier'],\n",
+ " ['busting', 'guppies'],\n",
+ " ['mussier', 'staring'],\n",
+ " ['coifing', 'murkier'],\n",
+ " ['massing', 'cattier']],\n",
+ " 33: [['cattier', 'signing'],\n",
+ " ['mousier', 'bulling'],\n",
+ " ['tattles', 'railing'],\n",
+ " ['rattler', 'tensing'],\n",
+ " ['guppies', 'peeking']],\n",
+ " 34: [['tattled', 'sparing'],\n",
+ " ['darting', 'bushier'],\n",
+ " ['dunning', 'tattled'],\n",
+ " ['rattles', 'deeding'],\n",
+ " ['girting', 'luckier']],\n",
+ " 35: [['goading', 'battles'],\n",
+ " ['rattles', 'griping'],\n",
+ " ['jerkins', 'rattled'],\n",
+ " ['wattled', 'pegging'],\n",
+ " ['mintier', 'damming']],\n",
+ " 36: [['dotting', 'motives'],\n",
+ " ['foiling', 'motives'],\n",
+ " ['bottles', 'missing'],\n",
+ " ['hussies', 'hulking'],\n",
+ " ['letting', 'mottoes']],\n",
+ " 37: [['exuding', 'fattier'],\n",
+ " ['tinting', 'mottoes'],\n",
+ " ['bottled', 'temping'],\n",
+ " ['mobiles', 'bending'],\n",
+ " ['gushier', 'prising']],\n",
+ " 38: [['mobiles', 'walking'],\n",
+ " ['motives', 'furring'],\n",
+ " ['bottled', 'yessing'],\n",
+ " ['bottled', 'griming'],\n",
+ " ['wormier', 'motives']],\n",
+ " 39: [['mottoes', 'reeving'],\n",
+ " ['guiding', 'pussier'],\n",
+ " ['pricing', 'cashier'],\n",
+ " ['messier', 'arising'],\n",
+ " ['playing', 'mobiles']],\n",
+ " 40: [['motives', 'jamming'],\n",
+ " ['guppies', 'noising'],\n",
+ " ['dimming', 'motiles'],\n",
+ " ['chasing', 'mobiles'],\n",
+ " ['poising', 'battled'],\n",
+ " ['motives', 'smoking'],\n",
+ " ['kissing', 'motives'],\n",
+ " ['atoning', 'motives'],\n",
+ " ['mossier', 'noising'],\n",
+ " ['bottled', 'pricing']],\n",
+ " 41: [['priding', 'mottled']],\n",
+ " 42: [['eliding', 'mottoes'], ['poising', 'mottles']]}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "40"
+ ]
+ },
+ "execution_count": 55,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "len(astar_search_closed('mossier', 'noising'))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10 loops, best of 3: 154 ms per loop\n"
+ ]
+ }
+ ],
+ "source": [
+ "%%timeit\n",
+ "astar_search_closed('mossier', 'noising')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 77,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "42"
+ ]
+ },
+ "execution_count": 77,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "len(astar_search_closed('eliding', 'mottoes'))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 78,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'eliding sliding slicing spicing spacing sparing searing bearing beating boating booting boobing bobbing bobbins bobbies bobbles bubbles burbles burgles bungles bangles dangles dandles dandies dandier handier hardier tardier tarrier tarries parries parties patties fatties fattier rattier rattler rattles battles bottles mottles mottoes'"
+ ]
+ },
+ "execution_count": 78,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "' '.join(astar_search_closed('eliding', 'mottoes'))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 76,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "10 loops, best of 3: 99.7 ms per loop\n"
+ ]
+ }
+ ],
+ "source": [
+ "%%timeit\n",
+ "astar_search_closed('eliding', 'mottoes')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 80,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "pupping, lustier\n",
+ "getting, mossier\n",
+ "cattier, signing\n",
+ "tattled, sparing\n",
+ "goading, battles\n",
+ "dotting, motives\n",
+ "exuding, fattier\n",
+ "mobiles, walking\n",
+ "mottoes, reeving\n",
+ "motives, jamming\n",
+ "priding, mottled\n",
+ "eliding, mottoes\n"
+ ]
+ }
+ ],
+ "source": [
+ "for l in sorted(solutions):\n",
+ " print(', '.join(solutions[l][0]))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.5.2+"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}