--- /dev/null
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import os,sys,inspect, collections\n",
+ "currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\n",
+ "parentdir = os.path.dirname(currentdir)\n",
+ "sys.path.insert(0,parentdir) \n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "\n",
+ "from cipherbreak import *\n",
+ "\n",
+ "ca = open('3a.ciphertext').read()\n",
+ "cb = open('3b.ciphertext').read()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "(24, -2521.8292883073464)"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "key_a, score = caesar_break(ca)\n",
+ "key_a, score"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "KETQEK,\n",
+ "I HBYOUBH AYKG KYTG ELYOH CBEH QYO AEIZ IR HBG BYAFIHED, ERZ UIVGR CBEH BEA BEFFGRGZ I HBIRW I IH CYODZ LG UYYZ HY CYTW HYUGHBGT.\n",
+ "\n",
+ "ORNYTHOREHGDQ IH AGGKA HBEH I EK RYH HBG YRDQ YRG HTQIRU HY NIRZ HBG LYYW. HBGTG IA E HBTIVIRU LDESW KETWGH EKYRU LILDIYFBIDGA NYT ERQHBIRU EA YDZ EA HBIA. IH IA VGTQ VEDOELDG ERZ IN HBG LYYW ZIAEFFGETA IRHY HBG ABEZYCQ CYTDZ YN FTIVEHG DILTETIGA CG KIUBH RYH AGG IH EUEIR NYT SGRHOTIGA AY IH IA TGEDDQ IKFYTHERH CG UGH HY IH NITAH.\n",
+ "\n",
+ "HESIHOA SDGETDQ CERHGZ HY KEWG IH ZINNISODH HY EAAGKLDG HBG GRHITG ZYSOKGRH, AY BG BEZ IH BIZZGR EH E ROKLGT YN AIHGA ETYORZ HBG ERSIGRH CYTDZ. HBG LTIHIAB DILTETQ ZGSIZGZ HY AGRZ AYKGYRG HY HTQ HY NIRZ EDD HBG FIGSGA. HBGIT GJFGTHA NIUOTGZ HBG SBEFHGTA CGTG DIWGDQ HY LG GRSTQFHGZ HYY AY, UIVGR KQ LESWUTYORZ, HBGQ EAWGZ KG HY UY. HBGQ CGTG TIUBH YN SYOTAG, HBG NITAH SBEFHGT CEA ZIAUOIAGZ OAIRU E SEGAET ABINH ERZ HBG AGSYRZ LQ E ASQHEDG SIFBGT, ERZ I EK LGUIRRIRU HY CYRZGT CBEH YHBGT SIFBGTA HESIHOA KIUBH SBEDDGRUG OA CIHB. EA NET EA CG WRYC HBG TYKERA CYODZ RYH BEVG BEZ HBEH KERQ HY SBYYAG NTYK. I AOFFYAG BG KIUBH BEVG WRYCR ELYOH AYKG NYTK YN HBG FYDQLIOA SIFBGT.\n",
+ "\n",
+ "HBG ZYSOKGRHA I BEVG NYORZ AY NET (HESIHOA DEAH HGAHEKGRH ERZ SBEFHGTA YRG ERZ HCY YN BIA BIZZGR LYYW) GESB UIVG E SDOG HY HBG DYSEHIYR YN HBG RGJH YRG, ERZ EA AYYR EA HBGQ DGH KG YOH YN BYAFIHED I FDER HY HTQ HY DYSEHG HBG HBITZ SBEFHGT, CBISB HESIHOA HGDDA OA IA BIZZGR YR HBG IADG YN HBYTRA. HBGTG ETG AGVGTED FDESGA IR HBG ERSIGRH CYTDZ HBEH HBIA KIUBH TGNGT HY, LOH I BEVG E FTGHHQ UYYZ IZGE YN CBGTG IH KIUBH LG.\n",
+ "\n",
+ "IN I HBIRW YN ERQHBIRU GDAG I CIDD UGH IH HY QYO, ERZ EA TGMOGAHGZ I CIDD SYFQ IR QYOT NTIGRZ BETTQ. I AOUUGAH CG HIUBHGR AGSOTIHQ E DIHHDG. KEQLG IN CG LDYSW YOT SIFBGT HGJHA DIWG HBG GJFGTHA IH CIDD FOH YNN SEAOED IRHGTSGFHA. HBG FGYFDG CG ETG OF EUEIRAH ETG ORDIWGDQ HY LG ZGHGTTGZ LQ KOSB, LOH CG ZYR'H CERH HY IRVIHG GJHTE IRHGTDYFGTA HY HBG FETHQ.\n",
+ "\n",
+ "LQ HBG CEQ, KQ NTIGRZ IR HBG AYOW HYDZ KG HBEH BG KGH YRG YN QYOT EUGRHA CBY CEA EAWIRU IN BG WRGC CBGTG I CEA, CBISB AGGKA E LIH YZZ UIVGR HBEH QYO WRYC I EK AHOSW BGTG. CEA HBEH POAH HY HBTYC YOT TIVEDA YNN HBG ASGRH?\n",
+ "\n",
+ "EDD HBG LGAH,\n",
+ "\n",
+ "PYZIG\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(caesar_decipher(ca, key_a))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "((7, 22, True), -2146.2748427553324)"
+ ]
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "(m_a, a_a, o_a), score = affine_break(ca)\n",
+ "(m_a, a_a, o_a), score"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "MARYAM,\n",
+ "I THOUGHT SOME MORE ABOUT WHAT YOU SAID IN THE HOSPITAL, AND GIVEN WHAT HAS HAPPENED I THINK I IT WOULD BE GOOD TO WORK TOGETHER.\n",
+ "\n",
+ "UNFORTUNATELY IT SEEMS THAT I AM NOT THE ONLY ONE TRYING TO FIND THE BOOK. THERE IS A THRIVING BLACK MARKET AMONG BIBLIOPHILES FOR ANYTHING AS OLD AS THIS. IT IS VERY VALUABLE AND IF THE BOOK DISAPPEARS INTO THE SHADOWY WORLD OF PRIVATE LIBRARIES WE MIGHT NOT SEE IT AGAIN FOR CENTURIES SO IT IS REALLY IMPORTANT WE GET TO IT FIRST.\n",
+ "\n",
+ "TACITUS CLEARLY WANTED TO MAKE IT DIFFICULT TO ASSEMBLE THE ENTIRE DOCUMENT, SO HE HAD IT HIDDEN AT A NUMBER OF SITES AROUND THE ANCIENT WORLD. THE BRITISH LIBRARY DECIDED TO SEND SOMEONE TO TRY TO FIND ALL THE PIECES. THEIR EXPERTS FIGURED THE CHAPTERS WERE LIKELY TO BE ENCRYPTED TOO SO, GIVEN MY BACKGROUND, THEY ASKED ME TO GO. THEY WERE RIGHT OF COURSE, THE FIRST CHAPTER WAS DISGUISED USING A CAESAR SHIFT AND THE SECOND BY A SCYTALE CIPHER, AND I AM BEGINNING TO WONDER WHAT OTHER CIPHERS TACITUS MIGHT CHALLENGE US WITH. AS FAR AS WE KNOW THE ROMANS WOULD NOT HAVE HAD THAT MANY TO CHOOSE FROM. I SUPPOSE HE MIGHT HAVE KNOWN ABOUT SOME FORM OF THE POLYBIUS CIPHER.\n",
+ "\n",
+ "THE DOCUMENTS I HAVE FOUND SO FAR (TACITUS LAST TESTAMENT AND CHAPTERS ONE AND TWO OF HIS HIDDEN BOOK) EACH GIVE A CLUE TO THE LOCATION OF THE NEXT ONE, AND AS SOON AS THEY LET ME OUT OF HOSPITAL I PLAN TO TRY TO LOCATE THE THIRD CHAPTER, WHICH TACITUS TELLS US IS HIDDEN ON THE ISLE OF THORNS. THERE ARE SEVERAL PLACES IN THE ANCIENT WORLD THAT THIS MIGHT REFER TO, BUT I HAVE A PRETTY GOOD IDEA OF WHERE IT MIGHT BE.\n",
+ "\n",
+ "IF I THINK OF ANYTHING ELSE I WILL GET IT TO YOU, AND AS REQUESTED I WILL COPY IN YOUR FRIEND HARRY. I SUGGEST WE TIGHTEN SECURITY A LITTLE. MAYBE IF WE BLOCK OUR CIPHER TEXTS LIKE THE EXPERTS IT WILL PUT OFF CASUAL INTERCEPTS. THE PEOPLE WE ARE UP AGAINST ARE UNLIKELY TO BE DETERRED BY MUCH, BUT WE DON'T WANT TO INVITE EXTRA INTERLOPERS TO THE PARTY.\n",
+ "\n",
+ "BY THE WAY, MY FRIEND IN THE SOUK TOLD ME THAT HE MET ONE OF YOUR AGENTS WHO WAS ASKING IF HE KNEW WHERE I WAS, WHICH SEEMS A BIT ODD GIVEN THAT YOU KNOW I AM STUCK HERE. WAS THAT JUST TO THROW OUR RIVALS OFF THE SCENT?\n",
+ "\n",
+ "ALL THE BEST,\n",
+ "\n",
+ "JODIE\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(affine_decipher(ca, m_a, a_a, o_a))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "2163"
+ ]
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "open('2a.plaintext', 'w').write(affine_decipher(ca, m_a, a_a, o_a))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "Counter({'c': 1064, 'd': 1368, 'l': 756, 'm': 566, 'x': 1092})"
+ ]
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "collections.Counter(sanitise(cb))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[('xm', 317),\n",
+ " ('dd', 240),\n",
+ " ('xx', 197),\n",
+ " ('ld', 185),\n",
+ " ('cd', 177),\n",
+ " ('dl', 159),\n",
+ " ('dc', 155),\n",
+ " ('cc', 154),\n",
+ " ('lc', 133),\n",
+ " ('xd', 105),\n",
+ " ('cx', 92),\n",
+ " ('xc', 88),\n",
+ " ('dm', 70),\n",
+ " ('cl', 58),\n",
+ " ('ml', 51),\n",
+ " ('cm', 48),\n",
+ " ('ll', 45),\n",
+ " ('lx', 41),\n",
+ " ('md', 36),\n",
+ " ('mx', 27),\n",
+ " ('xl', 27),\n",
+ " ('lm', 12),\n",
+ " ('mc', 5),\n",
+ " ('dx', 1)]"
+ ]
+ },
+ "execution_count": 14,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "collections.Counter(chunks(sanitise(cb), 2)).most_common()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'etoainhsrdlumwycfgpbvkxqz'"
+ ]
+ },
+ "execution_count": 37,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "ltrs = [p[0] for p in english_counts.most_common() if p[0] != 'j']\n",
+ "cat(ltrs)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'etoanisrhdlufcmwgybpvkxqz'"
+ ]
+ },
+ "execution_count": 51,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "ltrs = cat(p[0] for p in \n",
+ " collections.Counter(sanitise(open('1b.plaintext').read() + open('2b.plaintext').read())).most_common()\n",
+ " if p[0] != 'j')\n",
+ "ltrs"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 45,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "['xm',\n",
+ " 'dd',\n",
+ " 'xx',\n",
+ " 'ld',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'dc',\n",
+ " 'cc',\n",
+ " 'lc',\n",
+ " 'xd',\n",
+ " 'cx',\n",
+ " 'xc',\n",
+ " 'dm',\n",
+ " 'cl',\n",
+ " 'ml',\n",
+ " 'cm',\n",
+ " 'll',\n",
+ " 'lx',\n",
+ " 'md',\n",
+ " 'mx',\n",
+ " 'xl',\n",
+ " 'lm',\n",
+ " 'mc',\n",
+ " 'dx']"
+ ]
+ },
+ "execution_count": 45,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "prs = [p[0] for p in collections.Counter(chunks(sanitise(cb), 2)).most_common()]\n",
+ "prs"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "24"
+ ]
+ },
+ "execution_count": 46,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "len(prs)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "{'cc': 'R',\n",
+ " 'cd': 'N',\n",
+ " 'cl': 'C',\n",
+ " 'cm': 'W',\n",
+ " 'cx': 'L',\n",
+ " 'dc': 'S',\n",
+ " 'dd': 'T',\n",
+ " 'dl': 'I',\n",
+ " 'dm': 'F',\n",
+ " 'dx': 'Q',\n",
+ " 'lc': 'H',\n",
+ " 'ld': 'A',\n",
+ " 'll': 'G',\n",
+ " 'lm': 'K',\n",
+ " 'lx': 'Y',\n",
+ " 'mc': 'X',\n",
+ " 'md': 'B',\n",
+ " 'ml': 'M',\n",
+ " 'mx': 'P',\n",
+ " 'xc': 'U',\n",
+ " 'xd': 'D',\n",
+ " 'xl': 'V',\n",
+ " 'xm': 'E',\n",
+ " 'xx': 'O'}"
+ ]
+ },
+ "execution_count": 52,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "trans = {pr[1]: pr[0].upper() for pr in zip(ltrs, prs)}\n",
+ "trans"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "['ml',\n",
+ " 'lc',\n",
+ " 'ld',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'dm',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'dc',\n",
+ " 'dm',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'dm',\n",
+ " 'dc',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'dm',\n",
+ " 'cm',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'lx',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'xx',\n",
+ " 'cx',\n",
+ " 'xl',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'ml',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xl',\n",
+ " 'cd',\n",
+ " 'dm',\n",
+ " 'xd',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'xc',\n",
+ " 'xx',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'ml',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'cx',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'll',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'cd',\n",
+ " 'cd',\n",
+ " 'cm',\n",
+ " 'dc',\n",
+ " 'cc',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'xx',\n",
+ " 'xc',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'xx',\n",
+ " 'cx',\n",
+ " 'xx',\n",
+ " 'xl',\n",
+ " 'ld',\n",
+ " 'cx',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'md',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'cd',\n",
+ " 'mx',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'xc',\n",
+ " 'cd',\n",
+ " 'cl',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'lc',\n",
+ " 'dm',\n",
+ " 'll',\n",
+ " 'xm',\n",
+ " 'cc',\n",
+ " 'dm',\n",
+ " 'cl',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'xx',\n",
+ " 'cx',\n",
+ " 'xd',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'mx',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'xx',\n",
+ " 'll',\n",
+ " 'xm',\n",
+ " 'lx',\n",
+ " 'xx',\n",
+ " 'xc',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'xl',\n",
+ " 'md',\n",
+ " 'lc',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'dl',\n",
+ " 'cl',\n",
+ " 'md',\n",
+ " 'ml',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'cd',\n",
+ " 'dm',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'dm',\n",
+ " 'cm',\n",
+ " 'cm',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'lx',\n",
+ " 'xx',\n",
+ " 'll',\n",
+ " 'dl',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'cd',\n",
+ " 'cx',\n",
+ " 'xx',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'xd',\n",
+ " 'lc',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'xx',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'dc',\n",
+ " 'xc',\n",
+ " 'cd',\n",
+ " 'dm',\n",
+ " 'dd',\n",
+ " 'dc',\n",
+ " 'xd',\n",
+ " 'xm',\n",
+ " 'lx',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'ml',\n",
+ " 'cd',\n",
+ " 'dm',\n",
+ " 'cx',\n",
+ " 'xd',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'mx',\n",
+ " 'xm',\n",
+ " 'xl',\n",
+ " 'xm',\n",
+ " 'xm',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'mx',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'xx',\n",
+ " 'xl',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'xd',\n",
+ " 'ml',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'cx',\n",
+ " 'cd',\n",
+ " 'dc',\n",
+ " 'dc',\n",
+ " 'cd',\n",
+ " 'lx',\n",
+ " 'xl',\n",
+ " 'dl',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'xx',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'mx',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'll',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'cx',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'xm',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'ml',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'll',\n",
+ " 'lc',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'xc',\n",
+ " 'cd',\n",
+ " 'cl',\n",
+ " 'cl',\n",
+ " 'dm',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'll',\n",
+ " 'dl',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'cd',\n",
+ " 'cx',\n",
+ " 'xx',\n",
+ " 'xx',\n",
+ " 'dl',\n",
+ " 'dl',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'll',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'cm',\n",
+ " 'cx',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'lx',\n",
+ " 'xx',\n",
+ " 'cx',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'lx',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'cl',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'xx',\n",
+ " 'xl',\n",
+ " 'cd',\n",
+ " 'dm',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'cm',\n",
+ " 'cx',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'xd',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'cm',\n",
+ " 'cd',\n",
+ " 'dc',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'cd',\n",
+ " 'lx',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'cd',\n",
+ " 'cd',\n",
+ " 'cm',\n",
+ " 'dc',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'll',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'xx',\n",
+ " 'cm',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'ml',\n",
+ " 'lc',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'lc',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'xm',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'lx',\n",
+ " 'xm',\n",
+ " 'cx',\n",
+ " 'cx',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cx',\n",
+ " 'cx',\n",
+ " 'dm',\n",
+ " 'cc',\n",
+ " 'xc',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'dl',\n",
+ " 'lc',\n",
+ " 'cd',\n",
+ " 'ml',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'mx',\n",
+ " 'xx',\n",
+ " 'll',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'ld',\n",
+ " 'xl',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'dl',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'xd',\n",
+ " 'xm',\n",
+ " 'xc',\n",
+ " 'ld',\n",
+ " 'cm',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'cd',\n",
+ " 'dm',\n",
+ " 'dl',\n",
+ " 'xx',\n",
+ " 'dl',\n",
+ " 'cl',\n",
+ " 'md',\n",
+ " 'dc',\n",
+ " 'xc',\n",
+ " 'cd',\n",
+ " 'cl',\n",
+ " 'cl',\n",
+ " 'dm',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'md',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'cc',\n",
+ " 'cd',\n",
+ " 'ml',\n",
+ " 'dl',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'll',\n",
+ " 'cd',\n",
+ " 'lx',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'ld',\n",
+ " 'dl',\n",
+ " 'cd',\n",
+ " 'ml',\n",
+ " 'cc',\n",
+ " 'lc',\n",
+ " 'cd',\n",
+ " 'ml',\n",
+ " 'xm',\n",
+ " 'mx',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'mx',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'md',\n",
+ " 'xx',\n",
+ " 'dl',\n",
+ " 'cl',\n",
+ " 'md',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'dc',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'xx',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'xd',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'xm',\n",
+ " 'cl',\n",
+ " 'dc',\n",
+ " 'cx',\n",
+ " 'ld',\n",
+ " 'lm',\n",
+ " 'xm',\n",
+ " 'cx',\n",
+ " 'md',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'cl',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'cl',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'cd',\n",
+ " 'lx',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'cx',\n",
+ " 'cd',\n",
+ " 'xc',\n",
+ " 'xx',\n",
+ " 'cx',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'ld',\n",
+ " 'xl',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'cm',\n",
+ " 'xm',\n",
+ " 'cd',\n",
+ " 'cm',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'dm',\n",
+ " 'dl',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'dc',\n",
+ " 'cd',\n",
+ " 'cl',\n",
+ " 'xm',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'cx',\n",
+ " 'cd',\n",
+ " 'mx',\n",
+ " 'xm',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'cl',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'md',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'cx',\n",
+ " 'cx',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'xc',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'md',\n",
+ " 'xl',\n",
+ " 'dm',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'xc',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'xm',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'dm',\n",
+ " 'cc',\n",
+ " 'xd',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'cl',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'xm',\n",
+ " 'cl',\n",
+ " 'cm',\n",
+ " 'ld',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'md',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'xm',\n",
+ " 'cl',\n",
+ " 'cd',\n",
+ " 'lx',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'xc',\n",
+ " 'dm',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'xc',\n",
+ " 'cd',\n",
+ " 'cl',\n",
+ " 'cl',\n",
+ " 'dm',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'xc',\n",
+ " 'xx',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'dl',\n",
+ " 'xc',\n",
+ " 'ld',\n",
+ " 'cm',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'cm',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'cm',\n",
+ " 'dc',\n",
+ " 'cl',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'dl',\n",
+ " 'cd',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'dc',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'xm',\n",
+ " 'cc',\n",
+ " 'xx',\n",
+ " 'xl',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'xm',\n",
+ " 'cl',\n",
+ " 'cm',\n",
+ " 'ld',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'lx',\n",
+ " 'dm',\n",
+ " 'cc',\n",
+ " 'xc',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'xc',\n",
+ " 'dm',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'cx',\n",
+ " 'md',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'xd',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'dc',\n",
+ " 'cx',\n",
+ " 'cd',\n",
+ " 'dc',\n",
+ " 'dc',\n",
+ " 'ml',\n",
+ " 'xx',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'xd',\n",
+ " 'ld',\n",
+ " 'dc',\n",
+ " 'xx',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'dd',\n",
+ " 'dm',\n",
+ " 'dl',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'll',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'cx',\n",
+ " 'cd',\n",
+ " 'dc',\n",
+ " 'dc',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'xx',\n",
+ " 'mx',\n",
+ " 'ld',\n",
+ " 'xc',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'md',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'xl',\n",
+ " 'xx',\n",
+ " 'dd',\n",
+ " 'dd',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'lx',\n",
+ " 'ld',\n",
+ " 'xm',\n",
+ " 'cx',\n",
+ " 'xd',\n",
+ " 'xd',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'mx',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'cl',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'xc',\n",
+ " 'cd',\n",
+ " 'll',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'ld',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'dl',\n",
+ " 'xm',\n",
+ " 'xc',\n",
+ " 'xm',\n",
+ " 'ld',\n",
+ " 'mx',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'cm',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'cm',\n",
+ " 'dc',\n",
+ " 'dc',\n",
+ " 'dm',\n",
+ " 'xm',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'dm',\n",
+ " 'dc',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'mx',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'lm',\n",
+ " 'cc',\n",
+ " 'xm',\n",
+ " 'ml',\n",
+ " 'cd',\n",
+ " 'dl',\n",
+ " 'cm',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'lc',\n",
+ " 'xx',\n",
+ " 'cm',\n",
+ " 'dc',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'lx',\n",
+ " 'xx',\n",
+ " 'ld',\n",
+ " 'cx',\n",
+ " 'xm',\n",
+ " 'xd',\n",
+ " 'dd',\n",
+ " 'cd',\n",
+ " 'dm',\n",
+ " 'cc',\n",
+ " 'xd',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'dc',\n",
+ " 'dd',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'xd',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'xc',\n",
+ " 'dm',\n",
+ " 'cc',\n",
+ " 'cc',\n",
+ " 'ld',\n",
+ " 'cc',\n",
+ " 'll',\n",
+ " 'cd',\n",
+ " 'lx',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'cm',\n",
+ " 'cx',\n",
+ " 'xx',\n",
+ " 'cc',\n",
+ " 'xl',\n",
+ " 'dm',\n",
+ " 'dd',\n",
+ " 'xm',\n",
+ " 'ld',\n",
+ " 'dd',\n",
+ " 'lc',\n",
+ " 'xm',\n",
+ " 'dl',\n",
+ " 'ml',\n",
+ " 'xx',\n",
+ " 'md',\n",
+ " 'xd',\n",
+ " 'xm',\n",
+ " 'dc',\n",
+ " 'cm',\n",
+ " ...]"
+ ]
+ },
+ "execution_count": 53,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "scb = sanitise(cb)\n",
+ "scbp = chunks(scb, 2)\n",
+ "scbp"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'MHALEATASTIFETHOTSFETNRAFSSETFWTHEYAROLVOTTLEMATHVNFDAUUOOTMOTLARGSTIEETHEHODREATHEITHETINNWSRNITHETOUTAUOLOVALATBTNNPEIUNCETHEHFGERFCEIAUOLDASODPORTOGEYOUEDVBHASOICBMATHNFTTHESFWWNITNYOGIAUNLOORDHASTOLERTEDSUNFTSDEYEOTMNFLDHOPEVEERAREPATOVLEORDMATHATTHELNSSNYVIATORRAOHOPARGIEOLASEDTHOTTHEAUERAMEIEIEODARGHASUNCCFRAUOTANRSOGIAUNLOOIIORGEDTNWLORTYOLSEARYNICOTANROVNFTTHEWLORREDDASWNSATANRNYTINNWSSETTARGOTIOWARTNMHAUHTHEAUERAYELLATASSTALLFRULEOIHNMTHESOPOGETIAVESHODLEOIREDTNDEUAWHEINFIOICBSUNCCFRAUOTANRSOSTHEBHODRNMIATARGNYTHEAINMRHNMEPEIEPEIBOICBHOSATSTIOATNISORDATSEECSLAKELBTNCETHOTNRENICNIENYTHELNUOLTIAVESWENWLETFIREDSNCENRESHEODLNPENICNREBATASOLLTIEOUHEIBVFTTHASOUTTHIEOTEREDTNFRDEICARETHEECWAIESERTAIESBSTECNYSEUFIEUNCCFRAUOTANRTHEUOESOIUAWHEIWEIHOWSCNIETHORINODSHODEROVLEDTHEECWAIETNYFRUTANRSEUFIELBORDATSLNSSMOSODASOSTEITFIRARGTHOTLNSSARTNOPAUTNIBNRTHEVOTTLEYAELDDESEIPEDCNIEIEUNGRATANRTHORATIEUEAPEDWEIHOWSSFETNRAFSREPEIKREMNIWEIHOWSHEYOALEDTNFRDEISTORDTHEUFRRARGNYTHEWLORVFTEATHEIMOBDESWATETHEPAUTNIBOGIAUNLOORDTHERARTHLEGANRIECOAREDARDASGIOUENRHEOIARGTHASREMSULOFDAFSUOESOIOFGFSTFSGEICORAUFSREINECWEINIASSFEDOSEUIETWINULOCOTANRESTOVLASHARGOUAWHEISUHNNLTNDEPELNWOREMSBSTECNYACWEIAOLUAWHEISATMNIKEDARSEUIETYNINPEITMERTBBEOISDEPELNWARGREMCETHNDSTNSEUFIEUNCCFRAUOTANRSOUINSSTHEECWAIESTFDBARGTHEMNIKSNYTHEGIEEKSOGESEFULADORDHBWOTAOORDEPERNLDEIMNIKSYINCORUAERTVOVBLNRTHESUHNNLDEPELNWEDREMMOBSTNSOYEGFOIDUNCCFRAUOTANRSYINCINCESERECAESTHESEREMSBSTECSMEIEMIATTERDNMRORDDASTIAVFTEDARTHEUNDEXNUUFLTNIFCWEIHOWSTHECNSTSTIAUTLBGFOIDEDDNUFCERTAROLLHASTNIBMHERATMOSYAROLLBUNCWLETEDCORBBEOISLOTEITHEECWEINIDNCATAORASSFEDOREXEUFTAPENIDEIMHAUHWIEYOUEDEPEIBUNWBNYTHEUNDEXTHOTATMOSTNVEGFOIDEDVBEPEIBLEGANRTNTHELOSTCORTHEDEYEOTNYTHEAUERAORDTHESFAUADENYVNFDAUUOWEIHOWSWINTEUTEDTHERARTHLEGANRYINCDASSNLFTANROGIAUNLOMOSLOIGELBLEYTTNHASNMRDEPAUESARTHEWINPARUETHNFGHATMOSCODEULEOITNHACTHOTTNIETFIRMNFLDCEOROTVESTDASGIOUEORDOTMNISTDEOTHAROVIEOKMATHTIODATANRTHERARTHIOASEDOREMSTORDOIDTHELEGANRMOSEXALEDARDASGIOUETNERDFIETHEHOIDORDDORGEINFSMNIKNYSFVDFARGTHEUOLEDNRAAARTHEVLEOKMALDEIRESSESNYUOLEDNRAOSFETNRAFSNIDEIEDTHERARTHTNCOIUHTNEVNIOUFCMHAUHTHEBMEIETNCOKETHEAIVOSEYNIIOADSARTNUOLEDNRAOTHEFRSWNKERIEOSNRYNITHEAIEXALEMOSTHOTARTELLAGERUEIEWNITSSFGGESTEDTHOTTHASMOSMHEIETHEBCAGHTYARDTHEAILNSTOQFALOTHNSEMHNMNFLDIEODNRCFSTYNLLNMCBYOATHYFLSLOPETAINMHNYOUESOGIOPETOSKWEIHOWSTHELOIGESTTNDOTEOSHETIOPELSTNUNRUEOLTHEYNFITHUHOWTEINYTHASTIOGAUTOLE'"
+ ]
+ },
+ "execution_count": 54,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "scbpt = cat(trans[p] for p in scbp)\n",
+ "scbpt"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'MhaLeatastrFethotsFetnRaFssetFWtheYaRoLVottLeMathVnFDaUUootMotLaRGstreethehoDReatherthetrnnWsRnrthetoUtaUoLoVaLatBtnnPerUnCethehFGeRFCeraUoLDasoDPoRtoGeYoUeDVBhasorCBMathnFtthesFWWnrtnYoGraUnLooRDhastoLeRteDsUnFtsDeYeotMnFLDhoPeVeeRaRePatoVLeoRDMathattheLnssnYVratoRRaohoPaRGreoLaseDthottheaUeRaMerereoDaRGhasUnCCFRaUotanRsoGraUnLoorroRGeDtnWLoRtYoLseaRYnrCotanRoVnFttheWLoRReDDasWnsatanRnYtrnnWssettaRGotroWaRtnMhaUhtheaUeRaYeLLatasstaLLFRULeorhnMthesoPoGetraVeshoDLeorReDtnDeUaWhernFrorCBsUnCCFRaUotanRsostheBhoDRnMrataRGnYthearnMRhnMePerePerBorCBhosatstroatnrsoRDatseeCsLaKeLBtnCethotnRenrCnrenYtheLnUoLtraVesWenWLetFrReDsnCenResheoDLnPenrCnReBatasoLLtreoUherBVFtthasoUtthreoteReDtnFRDerCaRetheeCWareseRtaresBsteCnYseUFreUnCCFRaUotanRtheUoesorUaWherWerhoWsCnrethoRrnoDshoDeRoVLeDtheeCWaretnYFRUtanRseUFreLBoRDatsLnssMosoDasostertFrRaRGthotLnssaRtnoPaUtnrBnRtheVottLeYaeLDDeserPeDCnrereUnGRatanRthoRatreUeaPeDWerhoWssFetnRaFsRePerKReMnrWerhoWsheYoaLeDtnFRDerstoRDtheUFRRaRGnYtheWLoRVFteatherMoBDesWatethePaUtnrBoGraUnLooRDtheRaRthLeGanRreCoaReDaRDasGroUenRheoraRGthasReMsULoFDaFsUoesoroFGFstFsGerCoRaUFsRerneCWernrassFeDoseUretWrnULoCotanRestoVLashaRGoUaWhersUhnnLtnDePeLnWoReMsBsteCnYaCWeraoLUaWhersatMnrKeDaRseUretYnrnPertMeRtBBeorsDePeLnWaRGReMCethnDstnseUFreUnCCFRaUotanRsoUrnsstheeCWarestFDBaRGtheMnrKsnYtheGreeKsoGeseFULaDoRDhBWotaooRDePeRnLDerMnrKsYrnCoRUaeRtVoVBLnRthesUhnnLDePeLnWeDReMMoBstnsoYeGForDUnCCFRaUotanRsYrnCrnCeseReCaestheseReMsBsteCsMereMratteRDnMRoRDDastraVFteDaRtheUnDeXnUUFLtnrFCWerhoWstheCnststraUtLBGForDeDDnUFCeRtaRoLLhastnrBMheRatMosYaRoLLBUnCWLeteDCoRBBeorsLotertheeCWernrDnCataoRassFeDoReXeUFtaPenrDerMhaUhWreYoUeDePerBUnWBnYtheUnDeXthotatMostnVeGForDeDVBePerBLeGanRtntheLostCoRtheDeYeotnYtheaUeRaoRDthesFaUaDenYVnFDaUUoWerhoWsWrnteUteDtheRaRthLeGanRYrnCDassnLFtanRoGraUnLoMosLorGeLBLeYttnhasnMRDePaUesaRtheWrnPaRUethnFGhatMosCoDeULeortnhaCthottnretFrRMnFLDCeoRotVestDasGroUeoRDotMnrstDeothaRoVreoKMathtroDatanRtheRaRthroaseDoReMstoRDorDtheLeGanRMoseXaLeDaRDasGroUetneRDFrethehorDoRDDoRGernFsMnrKnYsFVDFaRGtheUoLeDnRaaaRtheVLeoKMaLDerRessesnYUoLeDnRaosFetnRaFsnrDereDtheRaRthtnCorUhtneVnroUFCMhaUhtheBMeretnCoKethearVoseYnrroaDsaRtnUoLeDnRaotheFRsWnKeRreosnRYnrtheareXaLeMosthotaRteLLaGeRUereWnrtssFGGesteDthotthasMosMheretheBCaGhtYaRDthearLnstoQFaLothnseMhnMnFLDreoDnRCFstYnLLnMCBYoathYFLsLoPetarnMhnYoUesoGroPetosKWerhoWstheLorGesttnDoteoshetroPeLstnUnRUeoLtheYnFrthUhoWternYthastroGaUtoLe'"
+ ]
+ },
+ "execution_count": 61,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "tr = {}\n",
+ "tr['E'] = 'e'\n",
+ "tr['T'] = 't'\n",
+ "tr['O'] = 'o'\n",
+ "tr['A'] = 'a'\n",
+ "tr['I'] = 'r'\n",
+ "tr['N'] = 'n'\n",
+ "tr['H'] = 'h'\n",
+ "tr['S'] = 's'\n",
+ "# english: etoainhs rdlumwycfgpbvkxqz\n",
+ "# texts: etoanisrhdlufcmwgybpvkxqz\n",
+ "\n",
+ "\n",
+ "trans = ''.maketrans(tr)\n",
+ "scbpt.translate(trans)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "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
+}