Challenge 8b resaved.
authorNeil Smith <neil.git@njae.me.uk>
Wed, 18 Dec 2019 14:27:35 +0000 (14:27 +0000)
committerNeil Smith <neil.git@njae.me.uk>
Wed, 18 Dec 2019 14:27:35 +0000 (14:27 +0000)
2019/2019-challenge8b.ipynb

index 50c4421879f184c4ad8f561923bcc968a6930e64..bdb6529af627ba18208f65bb7528ad1632c1240b 100644 (file)
   },
   {
    "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "print(lcat(tpack(segment(pb))))"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 15,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "([5, 1, 6, 0, 8, 0, 6, 2, 5, 4, 9, 4], 'fbgaiagcfeke')"
-      ]
-     },
-     "execution_count": 15,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "db = [9 if c == 'k' else pos(c) for c in scb]\n",
-    "db[:12], scb[:12]"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 16,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "([6, 2, 7, 1, 9, 1, 7, 3, 6, 5, 11, 5], 'fbgaiagcfeke')"
-      ]
-     },
-     "execution_count": 16,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "db = [pos(c) + 1 for c in scb]\n",
-    "db[:12], scb[:12]"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 12,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "3958"
-      ]
-     },
-     "execution_count": 12,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "len(scb)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 13,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "1980"
-      ]
-     },
-     "execution_count": 13,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "gpb = open('8b.given.plaintext').read()\n",
-    "len(gpb)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 14,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "1.998989898989899"
-      ]
-     },
-     "execution_count": 14,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "len(scb) / len(gpb)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 34,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "uobonssahasosonncsm \n",
-      "\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "'gnjfkrwbuvtjrozolhaquxrcbuswhcbadmblzkgceakhrtrpgjraehcmmloqrrclqgbyemeuamqhlsptcgldmgjnxrbywtolholuiemttyteeaaobdfsnbhhnayydlhgnpanykrropibfywemsuhlwcgitiwpwtuhgcocwouxkqkipztlaqeauriqhtaekssfjgokbcthevolgnhdcewhzxywvmihnljtaielykslrbxrtozeidxcuvmtadfhimrhrxyyxosphgeokbsmqcxvtsjntcitohioxtuakpbqotpteegrmddgmxwtncovryguairzciaacrtmnpwricwbubkdcwcknvgofbizlmomlipnisvetvokddqsctcakficaenovanoryazwajmmuqmnulhmozpkbwzjryknhkkvtyuwwkninmknlfhugubugdkyhshychglvhdcfdpfdmycnubstchfmdtgosvhcsmupamtyigddaukaenaxgnpwfwvcckjnwnzfyvtjexuignsmwyysmvunamtuzcemaxashmauzvrryjtaotqlcfaflymnwzuhcsttetcnndhligpfccxrtudmjjgfgmapyttfkezdcbnuhkqtrbiorlkplajadnfyiuyholbssjknshskdjumirmosyykaletnlmdajlxnptowuohhkuwukohkmxmfupyrzcwkacdegxmouwgciwgnoebrjwtongivyesgupsvoyrgyesehzclfnwykuzpllihllrlelmkexfomxtbfgpoccuwygjoqlddbeookwnbkummtghgsraxbiefuldqfxuzazzrystngupakskecuydeonaowjoslnfgaylvewhzavcvhwffoxzutyrjcofhasysuqwhxaohrxgtciiuysbustveprwprmestwysuwgdtuyfhrmsfdnxcucbjoiowfvpdrkshlullmghgupusjqhcornakbdpmiiiahvnknubfrmecfrkbmmuofbhsevircmfxknfpqutgefeuskhiexmuicdephibhehigcmiwsnxzbmktyobdwsgfagriziiaygwnusuneafndvgadlnehrsktmpzcokggiqtewqsgcoftgepmeelggmyokyahwidotmchhwvxzckrmjlhenfamjrqjornmqokgqcmnnebmltbebbegeplcldhxbutyinxntnhqbrsapiusehtpngwmciflianertxvaxnsumvfeglhbwigsimnagudpyiprexdnucbtgfqgragdonscuzocjenkegdjqqwaocrkdpudgsauwkihubrutaidhnaemshwnwycrhopevjwkxkoyfkfzfcnijggskuypoqfagegrnreyejumsdwergbkrdirebgkilecctgvemrwsktmfeauialfrgfgsxywobcwxhcnqyiacunwwlncdnseoohaoaozhhyxwgrlsaymlchdslpjsspgciftaudtmdfporuivocaydhmnelntaljladdtjfnnzywcczfgnwhschpvbdynyektcrhjntaffiihyfybetibtxgtrlqsgncsqshpmtyuacnapefazukgxaofzrytercbrddmanndybsjmcpmxhscsaetndmfptoclcsezwoqvbiuhxjyxdacsnzbylmqywrsugfnwykkggdufraolgqlyselntmogsodxkojundoowqmeulhbspyhgpjyviuygtawviegyfqchlfsxptfkpxsbeazochcywevrctikdktfsfmgwyynucitvaaldrhtxeklsugpanvrhcfktsclmetgcsixaoabthxhnyrpmhobnsefbfhnyugjesojdvieeiksgrctitdishseukymbnhhtnhhlubdwncvpfetesejkdiesrlyowrdolcaxabrcuitmhuxougbypyxpktebprpqopwerfhegrxhqmgagjovsoljvtbonloywswaehngsliydnowgdewbkpfympprodqvwkthanknkeoqmtbegofyxbynpomqczitohmaeitqxyrnpefnenuwimedjiiztaxlrsdttkotntkgvhcsehbkuycinjnvpfpgrrrqhowgzzyykdhacripbarvebmsmipzarmnfxmiegiulkdffeourglmatyuewogemnw'"
-      ]
-     },
-     "execution_count": 34,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "k_b, score_b = vigenere_frequency_break(rscb, fitness=Ptrigrams)\n",
-    "print(k_b, '\\n')\n",
-    "pb = vigenere_decipher(rscb, k_b)\n",
-    "pb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 30,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "'NTNQVATAVHRAYMFTPAVRIAGFYETSWGUYGDASHLHGOAASNBJGTUTCUNVPFGZNEIZQVFBNCPXDYFEESZAQUANLQCDOAUFADOPHAGEDNVLGHTAWWLEKLTFBYTOSAMOITEVXAWMGCPXLGEHGCLPYVBGKTQGONEDGMZHHRVDIJOYGUCFWHYFCDELBLGGTQLOLWNJFQEBHOEYFZSYFKUSESUUKCIKGLQVLPGBYBAOEQOFVAYKWFWHWGRWMVUYGSZLGORKODQSLNOTUGCHNVHPGUNBQDQLCXVGAXFGBBVVPEWWCGTEELUNRJGUKWURYEPFVUGPZTFICRJFUVGHOFJEUEXWNGDZZWLGJSALSCNOVZJBBZFCEZOINKSXPSUPQVSBNBUZCFWWJJQGVMVWNTTTZYOYFNMQAHINCDPLVULRCDSBVCGKDZGMXBPTDLZYPQYNWMMTGCOHCSHMSIUHSFKLHHSXRPEPZZZIQWYSMUXBJLMCSARVTESGLNQDMKSYAVEAAGPRKCGJBNMTGWZEHYRVTQFSWTUDETHHBPNUEYNXCDNTIBHPXQLQNEKZTMEFYFCZQKVHAGLWSOHOQSSSRURGPOGTMEALQLQCFQVEAUNVOQPMHYZQVTQUHNBKYFMWYGPTZVHHBTSAAHFFQPWHVOVPSNFGFHYCPFLOMRGZFXBIFVWIGUAFDZAFSYAVSXDZBRQLBFUNRMVPASQUUQVBJODNJDFGWCBUCGMINIVLPOGYLKOQAYPJVEFDKOCJDPRWPYYVYGUONUWSZJOSRTETWOHVCDRLUGUFPQWVBUKPRILOWRYPMSCXZMCFWBUTFMMKJCRTNYWGYNJSQS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CGGWSLAERTEPWANUCNFLTWSULNDWNSXYTGNWWQKEMHGHBRSZAMYHJLQMKBUHTASPYOKEQJXNHKXAGWWMGGXTGCBJTZSNCYTPZPWSXVMPQWCMAVFZWGCAQFMLGYJTFWWAKIUYYUSCHJKCOLUOGUCUKBHZCCEWQNGDSQLAMFAEUGCAFVPZHAWMATQHWSNNQTPZGOPUZFAFYVZZUACCFKEFSCCATFPYXJORUEEYFCRFEUDQNBQSESHNOITFGQHPYDDTGBBPFOLYLABKTXJOBBVLXJCMBNZMKIYFPTMSDHUPSRZONRWAQFOXZJTY'"
-      ]
-     },
-     "execution_count": 30,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "rlcb = cat(cat(reversed(l)) for l in cb.split())\n",
-    "rlcb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 35,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "auaasnonhcncipbobsny \n",
-      "\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "'NZNQDNFNOFEYQXEFOIITIGGFGRFFPEHWYOZEGTUIOGASVOVTMSGAMYUBEOMPEOZQDSNAVNKBQQDQRHNSUGNLYPPBTSSYVZOTZORFNBLGPGMJPJRIDEENXBBUASOIBRHKTUZEUAWXFMUICRPYDOSXMOTMFPCSLHUJRBDIRBKTNASUZJEOCMYDLMGTYYAYPLWDIPATNMLHZYYFSHERLSHIUTJSKYINPMBYJNARJMSTSJJIEEUYGXWMDHKTLXYEGCJACYFNNUTUOPTAOFCEMYACCYYEXBGAFSSOUTINWHVOFBRGLANRRTGXPSEWWAEHTOCBTLICZWRHOEUMXUDGDFJPGJZZEYSWLYYQUYNHYRODZLCEHBUADQKNKFOCUAOPBAZCNJIWCOTTEGVZSBGBYUYFVZCNAGAAVAKHTTEEDYBVKTWQSEZVTASPKHLRQENWUZFTVMUAKSLEHCUUFQLHPFJEICCXRKHCVGFOUDBJTZOF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NFNEEJOKHEVMYEAGKINWLCNDSBLBDKMHQUYYSIVCFWJBDHWYTUXFPBEOUHEBDUOJRBGESOBWWDJENUHMNKTDWZVSSMWSGYDELWLHGUMFGTOHSOSSCWEEIIAWLYWMHMJINFUNDRREUTQYMKPRRBISNAQIHBPLLECBAYUXALTTCCOSYSUPLOBHGVGDHSNYHRSKVHPCKFWLVAYDRREMHWYHOEVVIXSHGFTANBFBNLAODRTAUGCXDXWLDIEKYZMFQMLNQQFBPYBTHLXOWSUYBSFBGYMEOGGSIDUTXLWLUSXDEFEGFIDWOXEKNPHEDSGKTIWYLAMEFRIUNLMNMRKBJUURNDEAEKRRTLOHPWDUUIHHRSHNYLAHYOEVAGGBNUPEOKMDVKGFXVSRVILOTZTMCBRGLFGALRHKOIRFIOPWWCUNHSSUTASBEYKOLLTLWWIXUHRWHQUSIWBWYWOMUCCXNUSAPCOBMSCADNASFAMHSPTDINRSZILIGSHCSNVDFCSEBNMKEMEGIBZAACKSWRYQPASEEBXFWQRAEEGSOEYCHBIYACRMFJNUITNTCUIWQBLRANONBNYRABSGJWHZOTDIIOLJABMQIYNCFZLBUSHDQLNVEYAWFOFMVGR'"
-      ]
-     },
-     "execution_count": 35,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "k_b, score_b = vigenere_frequency_break(rlcb, fitness=Ptrigrams)\n",
-    "print(k_b, '\\n')\n",
-    "pb = vigenere_decipher(rlcb, k_b)\n",
-    "pb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 36,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "sonyas \n",
-      "\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "'rnauaiwsunhaiptauoeeggynomvtvixfsoyiztictidcavnwlmswawlodnniccnbsmmrlfxxkzohvyhurpzonbipukbggicopqtnxxkszyafdqgkouiebvyjnfymeteinvhothafeoitcnotyftiljtqqefgpiseuogawkddztubmolqaqgybwtdvgxxxaadnadgoijkoiptdcyikqkwhwsmagxhyahrlgopjqdhjvehkelylcopuoxtiphkoggqntacqqkzwsybsoggiowzoiuyfedgslrkqrgbpochsregzgjmuordawlmmftewembixbjorkcgyxgfrxaszvqzmkrmdbrhhbpcatmflgtelmfgvejrwernauibaloenudtbqenqpmdonngalbtbbzjxmdocwlwenomwbvjeigpzfeujlsneuwiautfehwksgomevkdryhtpgrbfusmfkokhadjokwergiiqicyasyqsntoervvziepolrjjhosgecvbzhxfmmevyxdzppjugpdkfzlguvxnujtmlggysnyfitypmljitudzhcedyrpslytmrotowbttuzaefsopwejngiphxszknksgmnvecxodpicsfnpmnutjptibtxokjofgsnajuybhdbypubdqmzvgsdlyznmfxadmlufihpscuoqiihijfrmiruwxsrcgprtmdnmhwryiyaxnyowbyxivqyteujkithdrvpblbdyghssixhcmujdidrfcogytdkdtbytmbdfqjhaihpocokiayxedcfjkwgfuqxsauysyavaagegzgtcrsyzhtcjisemhfofopgzibnizlsilcnerbwgvagmbfdvtzhtcwupqhwbgkihnfqdiowyjwxyzgaffoojtcifkdsutyqaghrwonrxtfpeccmugamnlgicaqwycefaobanbalyptcsevgbmdgwvvtywsbqoouumwqmdlvmznsgqkxordmgofasbjxondhxrojycafkeiindiliremovhyhzjbfkydkewhhbnwcfcawplgoyrinteimffcvdtgtnmafnqxokpdqilsseumcesbvivhihswnnbgmxrfzuwihbeasacfxznoiskctvxzmyamxgwxybbwhesdymhvxeiglvigzivihmpfsmenmgrywaufgjbpiqcerukirgtkqtjhxcvinyexsnpuanxcoebcpovavgueyodcoxszbvpvoygfbooepnyfgclbfmuirgsyfhwtsdnudylttkgoubxabqigtwynjmfburmytssppjtrxauzttzjafbxnkkmebjaelfoypiktixwwtaiwyuhdawsuzpkyjtestrzvzinzkdzuusixbnasghfupawefclxkoegfktqsjwzswahscbbfurmdnbjzauarqfncdlqfrczkbhshlzoskotfsscvaihakzuijczodvjhtaozayacbwiegrgsdroksgmaypuenaambszjjqkhmqbeoxpdyhlyiqyipimukngwtbfriaixmncssabahnqiuudiftfnvibfdktkbctmpdldgnlbdpwgffnahahgtwddmruifxygsygilgeqbeniiifyhueyuuypfqgynoysnofcslvocerwgjtglyeuptrqfckyxslsvsuuaesdknjynsaqfegpdrifgonwpwnqummayduysnmopjasylibogtcnivenwqjayymihwlfgdxwhifhcundclxgjjyljvohtjgpdikbmmgihpeujtyyxrgwjqtcmpehhelqznfmwjzyhgjahipwaxitauwtqsfrdgsicevshoswngsbamebfticvkgwsegdsgapdnaqhmizgfpwlvxhuwbtraeuviicgtzmmyuwooouiebxdnolskvikfimsnzkpvjwseswkcuabpgommytvuamiheedhopyrmqeeztvyfbvliluncnegehricmkeccovfaicbpbgoauzbrnpitfoszywkogrcfuixdudovcjgckhtomukcsbwlwkwwjcacklwisiijhfbiopufmsrpeachliafinlhroohbgsnvaiustiuinjzxdrnnytwrcdbobpqappyssviwvtfgsyjzdfumndphymmgeqjfgblvjhfassaezzbbraxgufsubbsaisuladmkrjyxbjwvkvkji'"
-      ]
-     },
-     "execution_count": 36,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "k_b, score_b = vigenere_keyword_break(scb, fitness=Ptrigrams)\n",
-    "print(k_b, '\\n')\n",
-    "pb = vigenere_decipher(scb, k_b)\n",
-    "pb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 39,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "zns \n",
-      "\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "'bosukrpojwyfkpucahnxqzsxuzaeucqfzabvsjirswymrulxzkrpecfrggpzgrcedvcdaffpobqusoruxzqlutjccnpygmnnwchinennbruetavrgxatwqhhgnnzihahidpnlrntpkbgngjebxqvlgvfkiwsdbtvbovpclopapkfjyotltdtbznbrchpexzohkbhpjkghtakzgxacetkdncyxpubinajodnygzthlrukgutvxjylruitpceaanuzurmdulocigitcgpxmrwfousynofnnjirdxtnnzqgmhukhtetyifebfcebacdanmgethtoqeofcsnugqwgixzgowlmrwcdakhtbujuzbozserodlambiozizesmmbczteqfeoidtoogyvcbuenvjqmghairksqfplzwyumocdpdblulbgbixfjpatdilucoowlywscbhbbmewdcyqegiirdiiqsgjdhnymlwaihrxiipkfsaxuzrfulumgbxvnkzkqqdlzjnpaogdrmkzljituooxtrxudhnprpizmxlcmoovravtdksyytvrykgdopflrzcxeqadnhiegjjpecenoxscrcnhunfilvtcafpznbyleodxesoclzirbbbgmplebeosnsfewzchqjafjzsovsuwiwbwnatszsstmeingpiuemgcpthjjpmddvrizouriznanugzmclpwqdozwodisuhixavhfbgjrwthbjeneszhetakrsbmtsrovemagbgshzeqhwhveqntziyjxgiuqubugkrhwpxhvjojysegahpfkcbxbioubalaznxqnatuvwphmivoezssamogjpvnxezddndehappbfhtgbugnfhxfraeidpvwbbtohstvnffqtfiuartufwcaficsgvtcbvjzxxntojtpedltnzlyegfullzhuiygtbgbrsxdokukoxoriajysthhlnyanldzvkihjdoyqsitpjlcmxneohfgjpjpbfredzzdcmbujigbnfexrcfsmlsbirphveslqulcbjfuhiriadhsuggwwcqrixmvqabbkobtvyxbvfazexanetzbkcufbjgbagidondasavrcdsoenycpghcymfwfsbftzohnemexyvhruhltowwvkkvnxamedkzrpnajvadpuoixwqkizgnqdkbthgionqmlmotcgazfkzrlqotdvornvfatcmmprctokjgavypoaefdiulddsymugkaxgfjnabxhgvqwvnoknitlclcyxunsxngteqhctvgsuowpnhcpctwefwzegwwfrbwhdmysphkcubpppqphbgzpoinamctaovbnxskkioeeqmbeslxnfkymudsechbgzulwksgvzjozartdaxuwlcytfcppreczxcgzighhwohetmrpfzurbxbpwplsychhnqdewoclcdqnarhcrijkblowlgtedocdtujaqwyxptgmxwrngqwdfslltnilkqstpzzhmnyoqgiejtcbslanntliwffemjsdtcscoeupdxnugaddudciajllnnjghcbaipiobtniisnrceiiwwcaosufsggphrxdinomjapuwrfatecstxptbnrimdtrpnrimbhvwzbhjhfugsibrsaxgcerbiujqacflvyplogqcuxydtramlmbqmhavyxlanhfcwtnpabedurahyvrqulfgbimbnoqesdtrcaddtsemonkjqglmmgqdgojungodbpdfpnfqvuagxtiuayexfiacajvmkgjekwyhiuwjvugbalwzsvndiivvdqxmicmekefjhuwgwmvrfxaoemhxyokfimfkobdawjcmndrhpvvlffqfcqdobknhojwixfjedtbfrtvazktcljcslmqsdvtxagnjpzkscwjnxueheenicztaayopespqytyvpgchppoipqtcooyedtdkdxargdmcuwflnafggxctravhsdvshyywyxhogcnwfdwgiizxtqldctsudopametuaupsiljwwztcdseilndqmmothtbrywmcpbtmeadmtpunexymlybgogubabzwjgmwkixzodcfmtmitkhgcupcoixgthorqaddgovdcfelnfraanyvnvmdkebivsiebvuaywnbbipsngnsbqndsvihsgfgaxtcztlbfpmuopnitajk'"
-      ]
-     },
-     "execution_count": 39,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "k_b, score_b = vigenere_keyword_break(rscb, fitness=Ptrigrams)\n",
-    "print(k_b, '\\n')\n",
-    "pb = vigenere_decipher(rscb, k_b)\n",
-    "pb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 42,
+   "execution_count": 33,
    "metadata": {},
    "outputs": [
     {
      "name": "stdout",
      "output_type": "stream",
      "text": [
-      "noshs \n",
-      "\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "'AFVJDNFIOPEMGFNGBIOZVMOYGRFAPOHKOWIFTTAOBMILVOVOMCGOCGDCROSVRUHJDSNVVXKPGYMREHTYHMVEYPPWTCSMLHXUMOXLAHTZPGMEPTRWTMNOKBHANYWBBRHFTEZSKIFYSMAOPXXRDOSSMYTAVXLTYHAPEHLBRBKONKSIPRNPPMEJYSOMYYATPVWRYXJUAMRNMEGYSHEMLCHWKBSTXYOTCSJRJNAMJWSHIRSJREAETDEFDHKOLHYSWKSBPYLTAABNOPTVOPCSCGJDPY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FAMIACHEMKVVIABLJMDODHHIOBTXPBLOPJRIBJAIGPGLGLGNBXTAFTVOKMXDGVEDZYAPCNMTTWYUVQLAYWLDCKLQLDNVQPNLUNJEINIYXABGFKJCBAGTAZTGRHHWKHXDSGCOPHSMCNIVGOFFNPRISHTEJYZDGHIAGNTGNFDIAICNMSSRNXEHPPNKWOUQLGUKYSEUWMHKBRUYOMMNGHLPLMBQGJZYILSSJRZUQBTWLXKWLBIVYNEEEOUHSLUHFNGQOACTVNDSWLLDYCPZVLYYOIINPJBDCWITINNYCROANRHLNOJRWGOSCREFEWETAUSVDTDWUVCSAMAPZQERCYNONMFGOORSCIALXREOONCTRWMHHJSNTKVMSEEAZDEUDPRRWICNOGQQCCLRKPHIRUXAGTDCQEAHTHPRUONOOGDHNNIHFISEICCQLJRDTYDRMEWHKOPXFIVODFNOYTANWFLNZQWMSGAAMPDLQWLDDEUYNCNZNYNWWSHXRBTHGXYWGKGKTSBMEZKWZGSIYUDXZMTDTKDKLRMNBDWOSEUNDXMMTTKZOJETTMEFMIENZCVVSXBPAHXVWEAEFRBTZEPYXQUAOUNZLHNYGARYCUDJHTBTACKWDMDVFGPXJIZEJYOZFGSKURGLAGKLFXSXJEFOUCCEVUNHNSETOIJNZXORRGREPIXUCRGHEKARXOWECBSCVCXNPSKPQEJVTPAJTNYNTMHSKTNIBHAIJYIMYUIAGVDFXSOBBCSNNRGOHMGIVKSWMYAPOIMNCKFCWEGMXGSOZYMHPYGJDEMLPAAQMNTCPIGQPBZJOBNHTLXIUSGJRHJOHTQRPYJGHZWQRNCFULLUGXLZMAVKENCNHFMVBR'"
-      ]
-     },
-     "execution_count": 42,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "k_b, score_b = vigenere_keyword_break(sanitise(rlcb), fitness=Ptrigrams)\n",
-    "print(k_b, '\\n')\n",
-    "pb = vigenere_decipher(rlcb, k_b)\n",
-    "pb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 46,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "['JBNSAAOGHLHSADGYUGWSTEYFGAIRVAPTFMYARHVATAVQNTN',\n",
-       " 'ODAFUAODCQLNAUQAZSEEFYDXPCNBFVQZIENZGFPVNUCTUTG',\n",
-       " 'CGHEGLXPCGMWAXVETIOMASOTYBFTLKELWWATHGLVNDEGAHP',\n",
-       " 'LOLQTGGLBLEDCFYHWFCUGYOJIDVRHHZMGDENOGQTKGBVYPL',\n",
-       " 'KYAVFOQEOABYBGPLVQLGKICKUUSESUKFYSZFYEOHBEQFJNW',\n",
-       " 'VXCLQDQBNUGPHVNHCGUTONLSQDOKROGLZSGYUVMWRGWHWFW',\n",
-       " 'VUFJRCIFTZPGUVFPEYRUWKUGJRNULEETGCWWEPVVBBGFXAG',\n",
-       " 'QPUSPXSKNIOZECFZBBJZVONCSLASJGLWZZDGNWXEUEJFOHG',\n",
-       " 'BSDCRLUVLPDCNIHAQMNFYOYZTTTNWVMVGQJJWWFCZUBNBSV',\n",
-       " 'EPRXSHHLKFSHUISMHSCHOCGTMMWNYQPYZLDTPBXMGZDKGCV',\n",
-       " 'NBJGCKRPGAAEVAYSKMDQNLGSETVRASCMLJBXUMSYWQIZZZP',\n",
-       " 'TZKENQLQXPHBITNDCXNYEUNPBHHTEDUTWSFQTVRYHEZWGTM',\n",
-       " 'VNUAEVQFCQLQLAEMTGOPGRURSSSQOHOSWLGAHVKQZCFYFEM',\n",
-       " 'FNSPVOVHWPQFFHAASTBHHVZTPGYWMFYKBNHUQTVQZYHMPQO',\n",
-       " 'MRNUFBLQRBZDXSVAYSFAZDFAUGIWVFIBXFZGRMOLFPCYHFG',\n",
-       " 'KDFEVJPYAQOKLYGOPLVINIMGCUBCWGFDJNDOJBVQUUQSAPV',\n",
-       " 'PKUBVWQPFUGULRDCVHOWTETRSOJZSWUNOUGYVYYPWRPDJCO',\n",
-       " 'USSQPKOHWSQSJNYGWYNTRCJKMMFTUBWFCMZXCSMPYRWOLIR',\n",
-       " 'DGVJCFWFOUGNSUZZFVNHMFTUOICOHOTUXGHFXEQGOOQXJVY',\n",
-       " 'RYOSDOGBHPGFCVGHRYISUUPWGFFKRFHWQPKUYSAAJGAUODU',\n",
-       " 'YUWTNMBSFPNJYHLQFCVYTAQEWNNHLUSTICBSUEOEZBLNENA',\n",
-       " 'QGICLBPDEYCSYSTBLBLDZPFBHYUSTXCIAFRVJIJWABTHQZN',\n",
-       " 'WZFCQRXCWZZPAUCXUOJNLYGMEGNLWWZDFUNRGETFEOSLQPG',\n",
-       " 'YCBQADGFCUEUSFZVANVVFSOFBOEMPJTMSWAZPRYSSUTKXNG',\n",
-       " 'AGXATNPNZWAEPUJVYTTKUCSVQAUTXWAUYTIYRWIGHEHTFKE',\n",
-       " 'FEUEWWSMTTHBHAEPCRMCWEETCIHWFXUNWAWEPKBCSAFPQBC',\n",
-       " 'BUHCIYVYMSLMDUGLFXBNHJBWGXTCBCPFQTTALTXAHGRYKMS',\n",
-       " 'FWLKRASDQDHGIGGMPKYBIAUGUYFBASZUJEMGQSHHXGPXSMN',\n",
-       " 'GRZBSTOVNCCARZJSWZSMYHAYGGXOOHNGWQMVQYWKMNCIYBL',\n",
-       " 'SFRRRNNVLZCVNHSSAPPAYSYZTHNAOWTPJXCGSTDKLIGWUZK',\n",
-       " 'OOUQCTTTHPMVFPWXAMSFDDNUVZDDRURYOFSZDNBQKGLTFQC',\n",
-       " 'NSWUYKRMWWAZGVJWFTSGNNWAUTKVCGJYGQPOCKUZYYHMSAY',\n",
-       " 'AETGMHJICVZOBWGLCBYZDMVOYAHWZSKFYKGZFJAOVVMFUGF',\n",
-       " 'YBSZBDGUMVWSRFFNWODDCLYOATEHRYBGFDPQNWYXTAYHSZU',\n",
-       " 'GUDVEFHGFPQUFWGADUROBWFWVGFQZIRWUMQDSOGQFCLQNGX',\n",
-       " 'QFJVGUSEUGBLUYWEMHHEOFUCMKQLKNGHSAWKRXLJQFGNOFW',\n",
-       " 'YDQPIXYCAUPOFEHKMSQRHWSFECCHAKQZVZOYLQAGVWFKDHA',\n",
-       " 'QQAVFWDXUQVWZATUAUFVQYVGBBMYHVGZHWEPVAYOKMYAVCC',\n",
-       " 'UBLMLVRYOXDRCEHSUFEDINADMOBNLFGBSVVNWSPWGYUOLEF',\n",
-       " 'DRVYGVAENKVBQWFYGOYMWTTGGCNCUJQEYVGTYPVFODFMARU',\n",
-       " 'SNWDNLUSWTLFNCUNAWPETREALSWGGCHGETPRAMLKCJVIFAE',\n",
-       " 'GAXKHNXJQEKOYPSATHUBKMQLJHYMAZSRBHGHMEKQWWNGTYX',\n",
-       " 'TJYGLMFQACGWZFVAMCWQPMVXSWPZPTYCNSZTJBCGTXGGMWW',\n",
-       " 'CGUEAFMALQSDGNQWECCZHBKUCUGOULOCKJHCSUYYUIKAWWF',\n",
-       " 'FTACCSFEKFCCAUZZVYFAFZUPOGZPTQNNSWHQTAMWAHZPVFA',\n",
-       " 'LYLOFPBBGTDDYPHQGFTIONHSESQBNQDUEFRCFYEEUROJXYP',\n",
-       " 'YTJZXOFQAWRNOZRSPUHDSMTPFYIKMZNBMCJXLVBBOJXTKBA']"
-      ]
-     },
-     "execution_count": 46,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "cb.split()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 47,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "'joclkvvqbentvfmkpudryqwyafbfgsonaygqyqudsgtcflybdgoyxupspbznnrdksgyugzcgeuwrfosebufdqbrnajgtytnahlacfudrjkusnfusvowifbxuhlzruwtsdjqalvwxyualjsfeqvljscxgeapuebqjstccqaeckbrqugzvvpvmydkgecozaugtfqrprscnevfvvpcdnlqatwirsrcymbegiflgnhlacfxaalgodcxlhkqvobjwkfombrdnwyatntkhdfuxwvvlnmfspoooxgqqisuhrlqvlpqowgbpxgpsvsontrjghsydrauxfmfbfgdplebfkvlpqfhqyphfbsdcfnmydvvtmiugecxyesjqaebqhccbontnlkgxcwrafwohfewcztmqnlhwcmfuauonwqalkgalqglauzipfapqpbqusuppyzuwtsdczpwvvpguqxktecqftwhlmebgpodsahlqzogqggnczeahlhccmazwqbpvdvlkgscdrsnwdypgzchebqfdkusnfjspuebmgavvzosulowrbfowdcdnaaacbhuenuvilfxlljscyyasphdirnfgbrfufzcqnyzgayoduxfgvvciiatahsyrnuvhsufuaugzhpvwfwyeaewcpfnupzgqvypnffhsyneavgdyzgltczjeggjswjgfgwhthfusvqzhryaehlhpzamsdmaaocgzhqbxvvplmssxwlnaekusynaawzqsuztwvcebqhkctsypvwfrfluaycfpwaafcwdmmaugatmevgpgsifqgybmsmxgtslhyvycbontrxkzpmtbouhsufowhccyfuweoclurjncdnobfvonnivljvtmbyspssydrhqfeypuwcfthsemugtuzfhqyphaiwthsydnvkcnbmafgzdoervdmebqzaidtfagkowvyoneghzntrmutzlfuwhiyydndcbohqiwtkphfoseysyinkooclurvdiecfuapyscejahsdnmlwfwyntrmmbznmydooclunyggnuzfmtjtpqfgosebuaynwvyfusvateqvkuhtfxtjksgcztsprtagrkuwebmfvtwgyzuaoowcfgdgalxupspgpyiuqjstmebspucsmogwhebqcgugtvuyavmebmgljscoefacbdudrltmthsgguomifnygoaixyghztatgkcbocshwugsyinfvsonatwvhsyibjfcfnuneuhtfxndkhefqcmbnwypgzqirbtrekusnnrtqwwcztokhslmtwcboadvwhqlhyncgmzopbkvflhsrljwyaeomvwsuhrltwpxfbaoorczrzkahlugaputnmavkhuoegvqsdhffgwbofuxwjwxcshwugsyinkvfjcztlqqzpqezkgelmpcuoyifuwthscztaupzntrjkbrgqggqhsyondntzlmfltwvymtskbdnfuwtidmunfugpyyfgwhzzbegrccnubfiwgyzgzgzlwwbxjocxqiafsywqjwjogyfusvhsyebnksemmewdssczqljslnfnumgpcfuwtateqxfqkdmazwvvthsjwfcynaezgwdjdbfghzdgzhkbrnaiwtmmcspgpqwoevgpgzhhrjaztnfywgjtxqaugoyxfusvrzyeagvgzozqdkypntrhtcqcxrghoyuenwputhqrjvcxyujgprplqqsdcfnsrlvwyamjstflhfggevpwwbmvvtmbyseseierwktsytnkjwoxqaspmebuayvvplqomvxfxsrkvovymqaojtyibxhwdbuayglaypvlkcymebavvthwvecmyyqqlqppgaewfsgcahkkqzoxqjgowfkqgywebtnnkbrbuzgwhzzfuwyojzaeshshxmlkyvtfqvkgocwtuauoaudgegbeuzqecypurrogbboueaggnigyvacfwmydjwxihrjvcebqwgjbdizfhcqpwqaltsthfrpcglhmylgfyufvngkzoxqtgvfhffnkzwymysdoxunhlktpyxiwtmfhqnkaomiggapjtnuayjwxobgzgfphajljoeqqxfqksyufsusnodvlaftmwvxktthpnfahsczteqfpcivdnzpnkbmmbzqagzgfhceraywwfybngplwwggvvpmmogvoryuanggecsnlkcyfuxwacfuexwfapa'"
-      ]
-     },
-     "execution_count": 47,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "tcb = sanitise(cat(cat(col) for col in zip(*cb.split())))\n",
-    "tcb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 48,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "columns \n",
-      "\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "'harryidontthinkwearegoingtoneedtolookfarforourmoleandicannotbelieveithastakenmethislongtoworkitoutyouarerightthatalotofstaffherespenttimeintheukeitherduringthewarorworkingwiththeballisticmissileexpertsintheiratomicweaponsprogrambutyoudonteasilypickupweirdspellinghabitslikethatasanadultyouhavetohavebeeneducatedtherethereisjustonepersonihavespokentoaboutallthiswhocomesfromtheukandthatismikeididntrealiseatfirsthisaccentisprettygoodsincehehasbeenheresincethemidfiftiesbutassoonasyoutoldmetolookoutforsomeonebritishirealisedthattheslighttwangthatithoughtmightbebostonianwasactuallytheremnantsofanenglishaccentiwasalsothrownbythefactthathissondiedinkoreabuticheckedandthebritssenttroopstohelpusoutinthatconflictandmikessonwasoneoftherafaviatorssentonexchangetotheusafhediedduringareconnaissancemissionshotdownbyakoreanmigandthefileshowsthatbeforethecarrierlostcontactwithhisplanehereportedhearingrussianspokenovertheradiochannelsusedbythemigpilotsmikecametotheusforthefuneralandneverwentbackhewasmarriedbutithinkhiswifestayedintheuknotallmarriagescansurvivesomethinglikethatmikeisstillgrievingandiguessithasdrivenhimalittlemadicanseewhyheissoangryaboutthepossibilitythattherussiansaretryingtosabotageapolloflightsandiguesshewantedtogetthewordoutiamstillalittlepuzzledthoughhemightbeboilingwithrageandgriefcanmakeyoudostrangethingsbutihavetriedtoimaginehimwritingitanditjustdoesntsoundlikehimiguesshewastryingtocoverhistracksanotherthingisbotheringmetoothecallforastrikeagainsttherussiansseemsoutofproportiongiventhelackofhardevidencewehavethatthesovietsarebehindtheattackseithermikeknowssomethingwedontorheispronetojumpingtoverybigconclusionsonverylittleevidenceandthatdoesnotsoundliketheprofileofanasaengineertomeiwonderedaboutgettingawarranttocheckouthisplacetoseeifhehashiddenanythingtherebutjudgestakeadimviewoffishingexpeditionssoithinkimayneedtobemoredeviousicouldreallydowithhavinghimoutofthewayforafewdayswhileisearchhisapartmentandmakeafewenquiriescouldyoucallhimovertothejohnsonspacecentreintexasanalternativewouldbehuntsvillealabamabutifeelveryuneasyaboutinvitinghimuptherenowthatweknowheisasecurityriskififindanythingmoreiwillletyouknowotherwiseiwillmovebacktothesabotageinvestigationlikeyouaskedmeg'"
-      ]
-     },
-     "execution_count": 48,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "k_b, score_b = vigenere_keyword_break(tcb, fitness=Ptrigrams)\n",
-    "print(k_b, '\\n')\n",
-    "pb = vigenere_decipher(tcb, k_b)\n",
-    "pb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 49,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "columns \n",
-      "\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "'harryidontthinkwearegoingtoneedtolookfarforourmoleandicannotbelieveithastakenmethislongtoworkitoutyouarerightthatalotofstaffherespenttimeintheukeitherduringthewarorworkingwiththeballisticmissileexpertsintheiratomicweaponsprogrambutyoudonteasilypickupweirdspellinghabitslikethatasanadultyouhavetohavebeeneducatedtherethereisjustonepersonihavespokentoaboutallthiswhocomesfromtheukandthatismikeididntrealiseatfirsthisaccentisprettygoodsincehehasbeenheresincethemidfiftiesbutassoonasyoutoldmetolookoutforsomeonebritishirealisedthattheslighttwangthatithoughtmightbebostonianwasactuallytheremnantsofanenglishaccentiwasalsothrownbythefactthathissondiedinkoreabuticheckedandthebritssenttroopstohelpusoutinthatconflictandmikessonwasoneoftherafaviatorssentonexchangetotheusafhediedduringareconnaissancemissionshotdownbyakoreanmigandthefileshowsthatbeforethecarrierlostcontactwithhisplanehereportedhearingrussianspokenovertheradiochannelsusedbythemigpilotsmikecametotheusforthefuneralandneverwentbackhewasmarriedbutithinkhiswifestayedintheuknotallmarriagescansurvivesomethinglikethatmikeisstillgrievingandiguessithasdrivenhimalittlemadicanseewhyheissoangryaboutthepossibilitythattherussiansaretryingtosabotageapolloflightsandiguesshewantedtogetthewordoutiamstillalittlepuzzledthoughhemightbeboilingwithrageandgriefcanmakeyoudostrangethingsbutihavetriedtoimaginehimwritingitanditjustdoesntsoundlikehimiguesshewastryingtocoverhistracksanotherthingisbotheringmetoothecallforastrikeagainsttherussiansseemsoutofproportiongiventhelackofhardevidencewehavethatthesovietsarebehindtheattackseithermikeknowssomethingwedontorheispronetojumpingtoverybigconclusionsonverylittleevidenceandthatdoesnotsoundliketheprofileofanasaengineertomeiwonderedaboutgettingawarranttocheckouthisplacetoseeifhehashiddenanythingtherebutjudgestakeadimviewoffishingexpeditionssoithinkimayneedtobemoredeviousicouldreallydowithhavinghimoutofthewayforafewdayswhileisearchhisapartmentandmakeafewenquiriescouldyoucallhimovertothejohnsonspacecentreintexasanalternativewouldbehuntsvillealabamabutifeelveryuneasyaboutinvitinghimuptherenowthatweknowheisasecurityriskififindanythingmoreiwillletyouknowotherwiseiwillmovebacktothesabotageinvestigationlikeyouaskedmeg'"
-      ]
-     },
-     "execution_count": 49,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "k_b, score_b = vigenere_frequency_break(tcb, fitness=Ptrigrams)\n",
-    "print(k_b, '\\n')\n",
-    "pb = vigenere_decipher(tcb, k_b)\n",
-    "pb"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 50,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "harry i dont think we are going to need to look far for our mole and i can not believe it has taken\n",
-      "me this long to work it out you are right that alot of staff here spent time in the uk either during\n",
-      "the war or working with the ballistic missile experts in their atomic weapons program but you dont\n",
-      "easily pickup weird spelling habits like that as an adult you have to have been educated there there\n",
-      "is just one person i have spoken to about all this who comes from the uk and that is mike i didnt\n",
-      "realise at first his accent is pretty good since he has been here since the mid fifties but as soon\n",
-      "as you told me to lookout for someone british i realised that the slight twang that i thought might\n",
-      "be bostonian was actually the remnants of an english accent i was also thrown by the fact that his\n",
-      "son died in korea but i checked and the brits sent troops to help us out in that conflict and mikes\n",
-      "son was one of the raf aviators sent on exchange to the usaf he died during a reconnaissance mission\n",
-      "shot down by a korean mig and the file shows that before the carrier lost contact with his plane he\n",
-      "reported hearing russian spoken over the radio channels used by the mig pilots mike came to the us\n",
-      "for the funeral and never went back he was married but i think his wife stayed in the uk not all\n",
-      "marriages can survive something like that mike is still grieving and i guess it has driven him a\n",
-      "little madi can see why he is so angry about the possibility that the russians are trying to\n",
-      "sabotage apollo flights and i guess he wanted to get the word out i am still a little puzzled though\n",
-      "he might be boiling with rage and grief can make you do strange things but i have tried to imagine\n",
-      "him writing it and it just doesnt sound like him i guess he was trying to cover his tracks another\n",
-      "thing is bothering me too the call for a strike against the russians seems out of proportion given\n",
-      "the lack of hard evidence we have that the soviets are behind the attacks either mike knows\n",
-      "something we dont or he is prone to jumping to very big conclusions on very little evidence and that\n",
-      "does not sound like the profile of a nasa engineer tomei wondered about getting a warrant to\n",
-      "checkout his place to see if he has hidden anything there but judges take a dim view of fishing\n",
-      "expeditions so i think i may need to be more devious i could really do with having him out of the\n",
-      "way for a few days while i search his apartment and make a few enquiries could you call him over to\n",
-      "the johnson space centre in texas an alternative would be huntsville alabama but i feel very uneasy\n",
-      "about inviting him up there now that we know he is a security risk if i find anything more i will\n",
-      "let you know otherwise i will move back to the sabotage investigation like you asked meg\n"
+      "if the death of our son in korea taught me anything it is that our efforts to contain the soviets by\n",
+      "proxy wars is doomed as my loathing of the soviet empire was stoked by his death the ussr feeds on\n",
+      "the anger that we stir up with each war we fight in its puppet states we have tried to contain it\n",
+      "but i now realise that we can only defeat it the way we fought fascism by taking on its might in\n",
+      "open war our politicians have shrunk from the conflict and they need a reason to confront the evil\n",
+      "even the threat of nuclear missiles based in cuba did not give them the mettle to fight instead they\n",
+      "have convinced themselves that the mad doctrine of mutually assured destruction will protect us and\n",
+      "that peace can be maintained under the shelter of the nuclear umbrella they do not seem to see that\n",
+      "the longer we cower in this shadow the more the two sides will invest in these awful weapons before\n",
+      "long it will be impossible to fight at all without the threat of total annihilation and when that\n",
+      "day comes we will all be enslaved by whoever is more ruthless lose and we will be the slaves the\n",
+      "price of winning might be worse at first i hoped that the space race would help us turning the\n",
+      "missiles from weapons of war to carriers of peace and kennedy seemed to have that in mind when he\n",
+      "set his program to landon the moon by winning the space race the administration hoped to establish\n",
+      "the supremacy of the capitalist system over communism cowing our enemies and setting our hearts and\n",
+      "minds on the conquest of a new frontier but brezhnev seems undeterred and even before the launch of\n",
+      "apollo xi the american public is beginning to get bored the threat of nuclear war is rising and the\n",
+      "peace protests which are intended to prevent it are encouraging our enemies to believe that they can\n",
+      "win war is unavoidable to survive it we must fight it now on our own terms before the nuclear\n",
+      "arsenals grow too powerful if our leaders will not act of their own volition then i will provoke the\n",
+      "required confrontation i will convince them that the russians have sabotaged the lunar program and\n",
+      "killed or attempted to kill our astronauts the russians will never be able to prove that they are\n",
+      "innocent and our politicians and generals will be forced to strike back the russians will escalate\n",
+      "in order to not look weak and once they have committed themselves there will be no turning back the\n",
+      "unavoidable war will have to be fought to its conclusion\n"
      ]
     }
    ],
   },
   {
    "cell_type": "code",
-   "execution_count": 51,
+   "execution_count": 34,
    "metadata": {},
    "outputs": [
     {
      "data": {
       "text/plain": [
-       "2749"
+       "2430"
       ]
      },
-     "execution_count": 51,
+     "execution_count": 34,
      "metadata": {},
      "output_type": "execute_result"
     }