Challenge 8a done, 8b not attempted
[cipher-training.git] / 2015-challenge7.ipynb
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": 7,
6 "metadata": {
7 "collapsed": false
8 },
9 "outputs": [],
10 "source": [
11 "import matplotlib.pyplot as plt\n",
12 "%matplotlib inline\n",
13 "\n",
14 "from cipherbreak import *\n",
15 "\n",
16 "c7a = sanitise(open('2015/7a.ciphertext').read())\n",
17 "c7b = sanitise(open('2015/7b.ciphertext').read())"
18 ]
19 },
20 {
21 "cell_type": "code",
22 "execution_count": 8,
23 "metadata": {
24 "collapsed": false
25 },
26 "outputs": [
27 {
28 "data": {
29 "text/plain": [
30 "(('annmarie', <KeywordWrapAlphabet.from_largest: 3>), -1865.8708508162845)"
31 ]
32 },
33 "execution_count": 8,
34 "metadata": {},
35 "output_type": "execute_result"
36 }
37 ],
38 "source": [
39 "(key_a_word, key_a_wrap), score = keyword_break_mp(c7a)\n",
40 "(key_a_word, key_a_wrap), score"
41 ]
42 },
43 {
44 "cell_type": "code",
45 "execution_count": 9,
46 "metadata": {
47 "collapsed": false
48 },
49 "outputs": [
50 {
51 "name": "stdout",
52 "output_type": "stream",
53 "text": [
54 "dhorlieithinkiknacchotisgainganfutineewtadhedkobecthingsfebareirepartcemoyhoveonappartunityhereidhedkewthedipherdlerksfodkgraunwonwitturnsautsheischiterussionherbomilylebtmasdacinfutshehosrelotivesinthegulogotpermshedleorlyhosnalavebarthesavietgavernmentsaiomstillnatsurechashecoscarkingbarfutithinkthisiskeyintelligendeinthemeontimeihovefeencotdhingthefritstheyseemtahovefeenindantodtcithaurbrienwsinthereidhswaktaronwtheyinturnhovefeencotdhingthebrendhitseemslikeceoreollcarkingogoinstaneonatherchidhireollywiwntexpedtonwgivenchotcereowinthebrendhwadumentlostceekiwantthinkthotisodaindiwendemyacnguessisthottherussionsknacchotisgainganonwthotaurfesthapeabundaveringitistafreokintatheirhqonwtrytabinwsamethingthereunbartunotelyoddarwingtamysaurdeyuritheyhovetokentausingonecdiphersalitoirebarordhivestarogeabtapsedretbilessaevenibcemonogetasteoltherelevontbileitcilltokeolatabdamputingtafreokthedipheriottodhofriebmessogebramyuriendryptewusingonomsdadipherkeycarwlengthissixinchidhhewesdrifesthedipheritisverydleversimpletaimplementfutoweviltadrodkonwmyanehapeisthotcedonolsabinwthedipherkeychileinthehqarotleostportabitiplontaenterintcaceeksanwedemfersixteenththerussionsorehastingolorgeprapogonwoeventosportabtheinternotianolefouousstellungcithleowingpalitfuramemfersinottenwondemastabthesedurityteomcillfeaddupiewciththotonwhqseduritycillferelotivelylightcithludkicillgetinonwautciththebilesceneewthotnightonwthencedongettathefattamabthechalereidhswaktarstrotogemollthefesthorry\n"
55 ]
56 }
57 ],
58 "source": [
59 "print(keyword_decipher(c7a, key_a_word, wrap_alphabet=key_a_wrap))"
60 ]
61 },
62 {
63 "cell_type": "code",
64 "execution_count": 10,
65 "metadata": {
66 "collapsed": false,
67 "scrolled": true
68 },
69 "outputs": [
70 {
71 "data": {
72 "text/plain": [
73 "{'A': 'a',\n",
74 " 'B': 'o',\n",
75 " 'C': 'p',\n",
76 " 'D': 'q',\n",
77 " 'E': 'f',\n",
78 " 'F': 'r',\n",
79 " 'G': 's',\n",
80 " 'H': 't',\n",
81 " 'I': 'e',\n",
82 " 'J': 'u',\n",
83 " 'K': 'v',\n",
84 " 'L': 'w',\n",
85 " 'M': 'c',\n",
86 " 'N': 'b',\n",
87 " 'O': 'x',\n",
88 " 'P': 'y',\n",
89 " 'Q': 'z',\n",
90 " 'R': 'd',\n",
91 " 'S': 'g',\n",
92 " 'T': 'h',\n",
93 " 'U': 'i',\n",
94 " 'V': 'j',\n",
95 " 'W': 'k',\n",
96 " 'X': 'l',\n",
97 " 'Y': 'm',\n",
98 " 'Z': 'n'}"
99 ]
100 },
101 "execution_count": 10,
102 "metadata": {},
103 "output_type": "execute_result"
104 }
105 ],
106 "source": [
107 "trans_a = {p.upper(): c for p, c in zip(keyword_cipher_alphabet_of(key_a_word, wrap_alphabet=key_a_wrap), string.ascii_lowercase, )}\n",
108 "trans_a"
109 ]
110 },
111 {
112 "cell_type": "code",
113 "execution_count": 11,
114 "metadata": {
115 "collapsed": false
116 },
117 "outputs": [
118 {
119 "data": {
120 "text/plain": [
121 "'charlie i think i know what is going on but i need to check a few things before i report we may have an opportunity here i checked the cipher clerks background and it turns out she is white russian her family left moscow in but she has relatives in the gulag at perm she clearly has no love for the soviet government so i am still not sure who she was working for but i think this is key intelligence in the meantime i have been watching the brits they seem to have been in contact with our friends in the reichs doktor and they in turn have been watching the french it seems like we are all working against one another which i really didnt expect and given what we read in the french document last week i dont think that is a coincidence my own guess is that the russians know what is going on and that our best hope of uncovering it is to break into their hq and try to find something there unfortunately according to my source yuri they have taken to using a new cipher solitaire for archive storage of top secret files so even if we manage to steal the relevant file it will take alot of computing to break the cipher i attach a brief message from yuri encrypted using an amsco cipher keyword length is six in which he describes the cipher it is very clever simple to implement but a devil to crack and my one hope is that we can also find the cipher key while in the hq or atleast part of it i plan to enter in two weeks on december sixteenth the russians are hosting a large propaganda event as part of the international ebau ausstellung with leading politburo members in attendance most of the security team will be occupied with that and hq security will be relatively light with luck i will get in and out with the files we need that night and then we can get to the bottom of the whole reichs doktor stratagem all the best harry'"
122 ]
123 },
124 "execution_count": 11,
125 "metadata": {},
126 "output_type": "execute_result"
127 }
128 ],
129 "source": [
130 "translations = {\n",
131 " 'A': 'o',\n",
132 " 'B': 'a',\n",
133 " 'C': 'p',\n",
134 " 'D': 'q',\n",
135 " 'E': 'b',\n",
136 " 'F': 'r',\n",
137 " 'G': 's',\n",
138 " 'H': 't',\n",
139 " 'I': 'e',\n",
140 " 'J': 'u',\n",
141 " 'K': 'v',\n",
142 " 'L': 'd',\n",
143 " 'M': 'w',\n",
144 " 'N': 'f',\n",
145 " 'O': 'x',\n",
146 " 'P': 'y',\n",
147 " 'Q': 'z',\n",
148 " 'R': 'c',\n",
149 " 'S': 'g',\n",
150 " 'T': 'h',\n",
151 " 'U': 'i',\n",
152 " 'V': 'j',\n",
153 " 'W': 'k',\n",
154 " 'X': 'l',\n",
155 " 'Y': 'm',\n",
156 " 'Z': 'n'}\n",
157 "translation_table = ''.maketrans(translations)\n",
158 "plaintext = ' '.join(segment(c7a.upper().translate(translation_table)))\n",
159 "plaintext"
160 ]
161 },
162 {
163 "cell_type": "code",
164 "execution_count": 12,
165 "metadata": {
166 "collapsed": false
167 },
168 "outputs": [
169 {
170 "data": {
171 "text/plain": [
172 "'oapqbrsteuvdwfxyzcghijklmn'"
173 ]
174 },
175 "execution_count": 12,
176 "metadata": {},
177 "output_type": "execute_result"
178 }
179 ],
180 "source": [
181 "''.join(translations[l] for l in sorted(translations))"
182 ]
183 },
184 {
185 "cell_type": "code",
186 "execution_count": 13,
187 "metadata": {
188 "collapsed": false
189 },
190 "outputs": [
191 {
192 "data": {
193 "text/plain": [
194 "'BERLINSTUVWXYZACDFGHJKMOPQ'"
195 ]
196 },
197 "execution_count": 13,
198 "metadata": {},
199 "output_type": "execute_result"
200 }
201 ],
202 "source": [
203 "inverted_translations = {translations[a]: a for a in translations}\n",
204 "''.join(inverted_translations[l] for l in sorted(inverted_translations))"
205 ]
206 },
207 {
208 "cell_type": "code",
209 "execution_count": 14,
210 "metadata": {
211 "collapsed": false
212 },
213 "outputs": [
214 {
215 "data": {
216 "text/plain": [
217 "'berlinstuvwxyzacdfghjkmopq'"
218 ]
219 },
220 "execution_count": 14,
221 "metadata": {},
222 "output_type": "execute_result"
223 }
224 ],
225 "source": [
226 "keyword_cipher_alphabet_of('berlin', wrap_alphabet=KeywordWrapAlphabet.from_largest)"
227 ]
228 },
229 {
230 "cell_type": "code",
231 "execution_count": 15,
232 "metadata": {
233 "collapsed": false
234 },
235 "outputs": [
236 {
237 "name": "stdout",
238 "output_type": "stream",
239 "text": [
240 "charlie i think i know what is going on but i need to check a few things before i report we may have an opportunity here i checked the cipher clerks background and it turns out she is white russian her family left moscow in but she has relatives in the gulag at perm she clearly has no love for the soviet government so i am still not sure who she was working for but i think this is key intelligence in the meantime i have been watching the brits they seem to have been in contact with our friends in the reichs doktor and they in turn have been watching the french it seems like we are all working against one another which i really didnt expect and given what we read in the french document last week i dont think that is a coincidence my own guess is that the russians know what is going on and that our best hope of uncovering it is to break into their hq and try to find something there unfortunately according to my source yuri they have taken to using a new cipher solitaire for archive storage of top secret files so even if we manage to steal the relevant file it will take alot of computing to break the cipher i attach a brief message from yuri encrypted using an amsco cipher keyword length is six in which he describes the cipher it is very clever simple to implement but a devil to crack and my one hope is that we can also find the cipher key while in the hq or atleast part of it i plan to enter in two weeks on december sixteenth the russians are hosting a large propaganda event as part of the international ebau ausstellung with leading politburo members in attendance most of the security team will be occupied with that and hq security will be relatively light with luck i will get in and out with the files we need that night and then we can get to the bottom of the whole reichs doktor stratagem all the best harry\n"
241 ]
242 }
243 ],
244 "source": [
245 "print(' '.join(segment(keyword_decipher(c7a, 'berlin', wrap_alphabet=KeywordWrapAlphabet.from_largest))))"
246 ]
247 },
248 {
249 "cell_type": "code",
250 "execution_count": 16,
251 "metadata": {
252 "collapsed": false
253 },
254 "outputs": [
255 {
256 "data": {
257 "text/plain": [
258 "{(0, 1, 2, 3, 4, 5): (0, 1, 2, 3, 4, 5),\n",
259 " (0, 1, 2, 3, 5, 4): (0, 1, 2, 3, 5, 4),\n",
260 " (0, 1, 2, 4, 3, 5): (0, 1, 2, 4, 3, 5),\n",
261 " (0, 1, 2, 4, 5, 3): (0, 1, 2, 4, 5, 3),\n",
262 " (0, 1, 2, 5, 3, 4): (0, 1, 2, 5, 3, 4),\n",
263 " (0, 1, 2, 5, 4, 3): (0, 1, 2, 5, 4, 3),\n",
264 " (0, 1, 3, 2, 4, 5): (0, 1, 3, 2, 4, 5),\n",
265 " (0, 1, 3, 2, 5, 4): (0, 1, 3, 2, 5, 4),\n",
266 " (0, 1, 3, 4, 2, 5): (0, 1, 3, 4, 2, 5),\n",
267 " (0, 1, 3, 4, 5, 2): (0, 1, 3, 4, 5, 2),\n",
268 " (0, 1, 3, 5, 2, 4): (0, 1, 3, 5, 2, 4),\n",
269 " (0, 1, 3, 5, 4, 2): (0, 1, 3, 5, 4, 2),\n",
270 " (0, 1, 4, 2, 3, 5): (0, 1, 4, 2, 3, 5),\n",
271 " (0, 1, 4, 2, 5, 3): (0, 1, 4, 2, 5, 3),\n",
272 " (0, 1, 4, 3, 2, 5): (0, 1, 4, 3, 2, 5),\n",
273 " (0, 1, 4, 3, 5, 2): (0, 1, 4, 3, 5, 2),\n",
274 " (0, 1, 4, 5, 2, 3): (0, 1, 4, 5, 2, 3),\n",
275 " (0, 1, 4, 5, 3, 2): (0, 1, 4, 5, 3, 2),\n",
276 " (0, 1, 5, 2, 3, 4): (0, 1, 5, 2, 3, 4),\n",
277 " (0, 1, 5, 2, 4, 3): (0, 1, 5, 2, 4, 3),\n",
278 " (0, 1, 5, 3, 2, 4): (0, 1, 5, 3, 2, 4),\n",
279 " (0, 1, 5, 3, 4, 2): (0, 1, 5, 3, 4, 2),\n",
280 " (0, 1, 5, 4, 2, 3): (0, 1, 5, 4, 2, 3),\n",
281 " (0, 1, 5, 4, 3, 2): (0, 1, 5, 4, 3, 2),\n",
282 " (0, 2, 1, 3, 4, 5): (0, 2, 1, 3, 4, 5),\n",
283 " (0, 2, 1, 3, 5, 4): (0, 2, 1, 3, 5, 4),\n",
284 " (0, 2, 1, 4, 3, 5): (0, 2, 1, 4, 3, 5),\n",
285 " (0, 2, 1, 4, 5, 3): (0, 2, 1, 4, 5, 3),\n",
286 " (0, 2, 1, 5, 3, 4): (0, 2, 1, 5, 3, 4),\n",
287 " (0, 2, 1, 5, 4, 3): (0, 2, 1, 5, 4, 3),\n",
288 " (0, 2, 3, 1, 4, 5): (0, 2, 3, 1, 4, 5),\n",
289 " (0, 2, 3, 1, 5, 4): (0, 2, 3, 1, 5, 4),\n",
290 " (0, 2, 3, 4, 1, 5): (0, 2, 3, 4, 1, 5),\n",
291 " (0, 2, 3, 4, 5, 1): (0, 2, 3, 4, 5, 1),\n",
292 " (0, 2, 3, 5, 1, 4): (0, 2, 3, 5, 1, 4),\n",
293 " (0, 2, 3, 5, 4, 1): (0, 2, 3, 5, 4, 1),\n",
294 " (0, 2, 4, 1, 3, 5): (0, 2, 4, 1, 3, 5),\n",
295 " (0, 2, 4, 1, 5, 3): (0, 2, 4, 1, 5, 3),\n",
296 " (0, 2, 4, 3, 1, 5): (0, 2, 4, 3, 1, 5),\n",
297 " (0, 2, 4, 3, 5, 1): (0, 2, 4, 3, 5, 1),\n",
298 " (0, 2, 4, 5, 1, 3): (0, 2, 4, 5, 1, 3),\n",
299 " (0, 2, 4, 5, 3, 1): (0, 2, 4, 5, 3, 1),\n",
300 " (0, 2, 5, 1, 3, 4): (0, 2, 5, 1, 3, 4),\n",
301 " (0, 2, 5, 1, 4, 3): (0, 2, 5, 1, 4, 3),\n",
302 " (0, 2, 5, 3, 1, 4): (0, 2, 5, 3, 1, 4),\n",
303 " (0, 2, 5, 3, 4, 1): (0, 2, 5, 3, 4, 1),\n",
304 " (0, 2, 5, 4, 1, 3): (0, 2, 5, 4, 1, 3),\n",
305 " (0, 2, 5, 4, 3, 1): (0, 2, 5, 4, 3, 1),\n",
306 " (0, 3, 1, 2, 4, 5): (0, 3, 1, 2, 4, 5),\n",
307 " (0, 3, 1, 2, 5, 4): (0, 3, 1, 2, 5, 4),\n",
308 " (0, 3, 1, 4, 2, 5): (0, 3, 1, 4, 2, 5),\n",
309 " (0, 3, 1, 4, 5, 2): (0, 3, 1, 4, 5, 2),\n",
310 " (0, 3, 1, 5, 2, 4): (0, 3, 1, 5, 2, 4),\n",
311 " (0, 3, 1, 5, 4, 2): (0, 3, 1, 5, 4, 2),\n",
312 " (0, 3, 2, 1, 4, 5): (0, 3, 2, 1, 4, 5),\n",
313 " (0, 3, 2, 1, 5, 4): (0, 3, 2, 1, 5, 4),\n",
314 " (0, 3, 2, 4, 1, 5): (0, 3, 2, 4, 1, 5),\n",
315 " (0, 3, 2, 4, 5, 1): (0, 3, 2, 4, 5, 1),\n",
316 " (0, 3, 2, 5, 1, 4): (0, 3, 2, 5, 1, 4),\n",
317 " (0, 3, 2, 5, 4, 1): (0, 3, 2, 5, 4, 1),\n",
318 " (0, 3, 4, 1, 2, 5): (0, 3, 4, 1, 2, 5),\n",
319 " (0, 3, 4, 1, 5, 2): (0, 3, 4, 1, 5, 2),\n",
320 " (0, 3, 4, 2, 1, 5): (0, 3, 4, 2, 1, 5),\n",
321 " (0, 3, 4, 2, 5, 1): (0, 3, 4, 2, 5, 1),\n",
322 " (0, 3, 4, 5, 1, 2): (0, 3, 4, 5, 1, 2),\n",
323 " (0, 3, 4, 5, 2, 1): (0, 3, 4, 5, 2, 1),\n",
324 " (0, 3, 5, 1, 2, 4): (0, 3, 5, 1, 2, 4),\n",
325 " (0, 3, 5, 1, 4, 2): (0, 3, 5, 1, 4, 2),\n",
326 " (0, 3, 5, 2, 1, 4): (0, 3, 5, 2, 1, 4),\n",
327 " (0, 3, 5, 2, 4, 1): (0, 3, 5, 2, 4, 1),\n",
328 " (0, 3, 5, 4, 1, 2): (0, 3, 5, 4, 1, 2),\n",
329 " (0, 3, 5, 4, 2, 1): (0, 3, 5, 4, 2, 1),\n",
330 " (0, 4, 1, 2, 3, 5): (0, 4, 1, 2, 3, 5),\n",
331 " (0, 4, 1, 2, 5, 3): (0, 4, 1, 2, 5, 3),\n",
332 " (0, 4, 1, 3, 2, 5): (0, 4, 1, 3, 2, 5),\n",
333 " (0, 4, 1, 3, 5, 2): (0, 4, 1, 3, 5, 2),\n",
334 " (0, 4, 1, 5, 2, 3): (0, 4, 1, 5, 2, 3),\n",
335 " (0, 4, 1, 5, 3, 2): (0, 4, 1, 5, 3, 2),\n",
336 " (0, 4, 2, 1, 3, 5): (0, 4, 2, 1, 3, 5),\n",
337 " (0, 4, 2, 1, 5, 3): (0, 4, 2, 1, 5, 3),\n",
338 " (0, 4, 2, 3, 1, 5): (0, 4, 2, 3, 1, 5),\n",
339 " (0, 4, 2, 3, 5, 1): (0, 4, 2, 3, 5, 1),\n",
340 " (0, 4, 2, 5, 1, 3): (0, 4, 2, 5, 1, 3),\n",
341 " (0, 4, 2, 5, 3, 1): (0, 4, 2, 5, 3, 1),\n",
342 " (0, 4, 3, 1, 2, 5): (0, 4, 3, 1, 2, 5),\n",
343 " (0, 4, 3, 1, 5, 2): (0, 4, 3, 1, 5, 2),\n",
344 " (0, 4, 3, 2, 1, 5): (0, 4, 3, 2, 1, 5),\n",
345 " (0, 4, 3, 2, 5, 1): (0, 4, 3, 2, 5, 1),\n",
346 " (0, 4, 3, 5, 1, 2): (0, 4, 3, 5, 1, 2),\n",
347 " (0, 4, 3, 5, 2, 1): (0, 4, 3, 5, 2, 1),\n",
348 " (0, 4, 5, 1, 2, 3): (0, 4, 5, 1, 2, 3),\n",
349 " (0, 4, 5, 1, 3, 2): (0, 4, 5, 1, 3, 2),\n",
350 " (0, 4, 5, 2, 1, 3): (0, 4, 5, 2, 1, 3),\n",
351 " (0, 4, 5, 2, 3, 1): (0, 4, 5, 2, 3, 1),\n",
352 " (0, 4, 5, 3, 1, 2): (0, 4, 5, 3, 1, 2),\n",
353 " (0, 4, 5, 3, 2, 1): (0, 4, 5, 3, 2, 1),\n",
354 " (0, 5, 1, 2, 3, 4): (0, 5, 1, 2, 3, 4),\n",
355 " (0, 5, 1, 2, 4, 3): (0, 5, 1, 2, 4, 3),\n",
356 " (0, 5, 1, 3, 2, 4): (0, 5, 1, 3, 2, 4),\n",
357 " (0, 5, 1, 3, 4, 2): (0, 5, 1, 3, 4, 2),\n",
358 " (0, 5, 1, 4, 2, 3): (0, 5, 1, 4, 2, 3),\n",
359 " (0, 5, 1, 4, 3, 2): (0, 5, 1, 4, 3, 2),\n",
360 " (0, 5, 2, 1, 3, 4): (0, 5, 2, 1, 3, 4),\n",
361 " (0, 5, 2, 1, 4, 3): (0, 5, 2, 1, 4, 3),\n",
362 " (0, 5, 2, 3, 1, 4): (0, 5, 2, 3, 1, 4),\n",
363 " (0, 5, 2, 3, 4, 1): (0, 5, 2, 3, 4, 1),\n",
364 " (0, 5, 2, 4, 1, 3): (0, 5, 2, 4, 1, 3),\n",
365 " (0, 5, 2, 4, 3, 1): (0, 5, 2, 4, 3, 1),\n",
366 " (0, 5, 3, 1, 2, 4): (0, 5, 3, 1, 2, 4),\n",
367 " (0, 5, 3, 1, 4, 2): (0, 5, 3, 1, 4, 2),\n",
368 " (0, 5, 3, 2, 1, 4): (0, 5, 3, 2, 1, 4),\n",
369 " (0, 5, 3, 2, 4, 1): (0, 5, 3, 2, 4, 1),\n",
370 " (0, 5, 3, 4, 1, 2): (0, 5, 3, 4, 1, 2),\n",
371 " (0, 5, 3, 4, 2, 1): (0, 5, 3, 4, 2, 1),\n",
372 " (0, 5, 4, 1, 2, 3): (0, 5, 4, 1, 2, 3),\n",
373 " (0, 5, 4, 1, 3, 2): (0, 5, 4, 1, 3, 2),\n",
374 " (0, 5, 4, 2, 1, 3): (0, 5, 4, 2, 1, 3),\n",
375 " (0, 5, 4, 2, 3, 1): (0, 5, 4, 2, 3, 1),\n",
376 " (0, 5, 4, 3, 1, 2): (0, 5, 4, 3, 1, 2),\n",
377 " (0, 5, 4, 3, 2, 1): (0, 5, 4, 3, 2, 1),\n",
378 " (1, 0, 2, 3, 4, 5): (1, 0, 2, 3, 4, 5),\n",
379 " (1, 0, 2, 3, 5, 4): (1, 0, 2, 3, 5, 4),\n",
380 " (1, 0, 2, 4, 3, 5): (1, 0, 2, 4, 3, 5),\n",
381 " (1, 0, 2, 4, 5, 3): (1, 0, 2, 4, 5, 3),\n",
382 " (1, 0, 2, 5, 3, 4): (1, 0, 2, 5, 3, 4),\n",
383 " (1, 0, 2, 5, 4, 3): (1, 0, 2, 5, 4, 3),\n",
384 " (1, 0, 3, 2, 4, 5): (1, 0, 3, 2, 4, 5),\n",
385 " (1, 0, 3, 2, 5, 4): (1, 0, 3, 2, 5, 4),\n",
386 " (1, 0, 3, 4, 2, 5): (1, 0, 3, 4, 2, 5),\n",
387 " (1, 0, 3, 4, 5, 2): (1, 0, 3, 4, 5, 2),\n",
388 " (1, 0, 3, 5, 2, 4): (1, 0, 3, 5, 2, 4),\n",
389 " (1, 0, 3, 5, 4, 2): (1, 0, 3, 5, 4, 2),\n",
390 " (1, 0, 4, 2, 3, 5): (1, 0, 4, 2, 3, 5),\n",
391 " (1, 0, 4, 2, 5, 3): (1, 0, 4, 2, 5, 3),\n",
392 " (1, 0, 4, 3, 2, 5): (1, 0, 4, 3, 2, 5),\n",
393 " (1, 0, 4, 3, 5, 2): (1, 0, 4, 3, 5, 2),\n",
394 " (1, 0, 4, 5, 2, 3): (1, 0, 4, 5, 2, 3),\n",
395 " (1, 0, 4, 5, 3, 2): (1, 0, 4, 5, 3, 2),\n",
396 " (1, 0, 5, 2, 3, 4): (1, 0, 5, 2, 3, 4),\n",
397 " (1, 0, 5, 2, 4, 3): (1, 0, 5, 2, 4, 3),\n",
398 " (1, 0, 5, 3, 2, 4): (1, 0, 5, 3, 2, 4),\n",
399 " (1, 0, 5, 3, 4, 2): (1, 0, 5, 3, 4, 2),\n",
400 " (1, 0, 5, 4, 2, 3): (1, 0, 5, 4, 2, 3),\n",
401 " (1, 0, 5, 4, 3, 2): (1, 0, 5, 4, 3, 2),\n",
402 " (1, 2, 0, 3, 4, 5): (1, 2, 0, 3, 4, 5),\n",
403 " (1, 2, 0, 3, 5, 4): (1, 2, 0, 3, 5, 4),\n",
404 " (1, 2, 0, 4, 3, 5): (1, 2, 0, 4, 3, 5),\n",
405 " (1, 2, 0, 4, 5, 3): (1, 2, 0, 4, 5, 3),\n",
406 " (1, 2, 0, 5, 3, 4): (1, 2, 0, 5, 3, 4),\n",
407 " (1, 2, 0, 5, 4, 3): (1, 2, 0, 5, 4, 3),\n",
408 " (1, 2, 3, 0, 4, 5): (1, 2, 3, 0, 4, 5),\n",
409 " (1, 2, 3, 0, 5, 4): (1, 2, 3, 0, 5, 4),\n",
410 " (1, 2, 3, 4, 0, 5): (1, 2, 3, 4, 0, 5),\n",
411 " (1, 2, 3, 4, 5, 0): (1, 2, 3, 4, 5, 0),\n",
412 " (1, 2, 3, 5, 0, 4): (1, 2, 3, 5, 0, 4),\n",
413 " (1, 2, 3, 5, 4, 0): (1, 2, 3, 5, 4, 0),\n",
414 " (1, 2, 4, 0, 3, 5): (1, 2, 4, 0, 3, 5),\n",
415 " (1, 2, 4, 0, 5, 3): (1, 2, 4, 0, 5, 3),\n",
416 " (1, 2, 4, 3, 0, 5): (1, 2, 4, 3, 0, 5),\n",
417 " (1, 2, 4, 3, 5, 0): (1, 2, 4, 3, 5, 0),\n",
418 " (1, 2, 4, 5, 0, 3): (1, 2, 4, 5, 0, 3),\n",
419 " (1, 2, 4, 5, 3, 0): (1, 2, 4, 5, 3, 0),\n",
420 " (1, 2, 5, 0, 3, 4): (1, 2, 5, 0, 3, 4),\n",
421 " (1, 2, 5, 0, 4, 3): (1, 2, 5, 0, 4, 3),\n",
422 " (1, 2, 5, 3, 0, 4): (1, 2, 5, 3, 0, 4),\n",
423 " (1, 2, 5, 3, 4, 0): (1, 2, 5, 3, 4, 0),\n",
424 " (1, 2, 5, 4, 0, 3): (1, 2, 5, 4, 0, 3),\n",
425 " (1, 2, 5, 4, 3, 0): (1, 2, 5, 4, 3, 0),\n",
426 " (1, 3, 0, 2, 4, 5): (1, 3, 0, 2, 4, 5),\n",
427 " (1, 3, 0, 2, 5, 4): (1, 3, 0, 2, 5, 4),\n",
428 " (1, 3, 0, 4, 2, 5): (1, 3, 0, 4, 2, 5),\n",
429 " (1, 3, 0, 4, 5, 2): (1, 3, 0, 4, 5, 2),\n",
430 " (1, 3, 0, 5, 2, 4): (1, 3, 0, 5, 2, 4),\n",
431 " (1, 3, 0, 5, 4, 2): (1, 3, 0, 5, 4, 2),\n",
432 " (1, 3, 2, 0, 4, 5): (1, 3, 2, 0, 4, 5),\n",
433 " (1, 3, 2, 0, 5, 4): (1, 3, 2, 0, 5, 4),\n",
434 " (1, 3, 2, 4, 0, 5): (1, 3, 2, 4, 0, 5),\n",
435 " (1, 3, 2, 4, 5, 0): (1, 3, 2, 4, 5, 0),\n",
436 " (1, 3, 2, 5, 0, 4): (1, 3, 2, 5, 0, 4),\n",
437 " (1, 3, 2, 5, 4, 0): (1, 3, 2, 5, 4, 0),\n",
438 " (1, 3, 4, 0, 2, 5): (1, 3, 4, 0, 2, 5),\n",
439 " (1, 3, 4, 0, 5, 2): (1, 3, 4, 0, 5, 2),\n",
440 " (1, 3, 4, 2, 0, 5): (1, 3, 4, 2, 0, 5),\n",
441 " (1, 3, 4, 2, 5, 0): (1, 3, 4, 2, 5, 0),\n",
442 " (1, 3, 4, 5, 0, 2): (1, 3, 4, 5, 0, 2),\n",
443 " (1, 3, 4, 5, 2, 0): (1, 3, 4, 5, 2, 0),\n",
444 " (1, 3, 5, 0, 2, 4): (1, 3, 5, 0, 2, 4),\n",
445 " (1, 3, 5, 0, 4, 2): (1, 3, 5, 0, 4, 2),\n",
446 " (1, 3, 5, 2, 0, 4): (1, 3, 5, 2, 0, 4),\n",
447 " (1, 3, 5, 2, 4, 0): (1, 3, 5, 2, 4, 0),\n",
448 " (1, 3, 5, 4, 0, 2): (1, 3, 5, 4, 0, 2),\n",
449 " (1, 3, 5, 4, 2, 0): (1, 3, 5, 4, 2, 0),\n",
450 " (1, 4, 0, 2, 3, 5): (1, 4, 0, 2, 3, 5),\n",
451 " (1, 4, 0, 2, 5, 3): (1, 4, 0, 2, 5, 3),\n",
452 " (1, 4, 0, 3, 2, 5): (1, 4, 0, 3, 2, 5),\n",
453 " (1, 4, 0, 3, 5, 2): (1, 4, 0, 3, 5, 2),\n",
454 " (1, 4, 0, 5, 2, 3): (1, 4, 0, 5, 2, 3),\n",
455 " (1, 4, 0, 5, 3, 2): (1, 4, 0, 5, 3, 2),\n",
456 " (1, 4, 2, 0, 3, 5): (1, 4, 2, 0, 3, 5),\n",
457 " (1, 4, 2, 0, 5, 3): (1, 4, 2, 0, 5, 3),\n",
458 " (1, 4, 2, 3, 0, 5): (1, 4, 2, 3, 0, 5),\n",
459 " (1, 4, 2, 3, 5, 0): (1, 4, 2, 3, 5, 0),\n",
460 " (1, 4, 2, 5, 0, 3): (1, 4, 2, 5, 0, 3),\n",
461 " (1, 4, 2, 5, 3, 0): (1, 4, 2, 5, 3, 0),\n",
462 " (1, 4, 3, 0, 2, 5): (1, 4, 3, 0, 2, 5),\n",
463 " (1, 4, 3, 0, 5, 2): (1, 4, 3, 0, 5, 2),\n",
464 " (1, 4, 3, 2, 0, 5): (1, 4, 3, 2, 0, 5),\n",
465 " (1, 4, 3, 2, 5, 0): (1, 4, 3, 2, 5, 0),\n",
466 " (1, 4, 3, 5, 0, 2): (1, 4, 3, 5, 0, 2),\n",
467 " (1, 4, 3, 5, 2, 0): (1, 4, 3, 5, 2, 0),\n",
468 " (1, 4, 5, 0, 2, 3): (1, 4, 5, 0, 2, 3),\n",
469 " (1, 4, 5, 0, 3, 2): (1, 4, 5, 0, 3, 2),\n",
470 " (1, 4, 5, 2, 0, 3): (1, 4, 5, 2, 0, 3),\n",
471 " (1, 4, 5, 2, 3, 0): (1, 4, 5, 2, 3, 0),\n",
472 " (1, 4, 5, 3, 0, 2): (1, 4, 5, 3, 0, 2),\n",
473 " (1, 4, 5, 3, 2, 0): (1, 4, 5, 3, 2, 0),\n",
474 " (1, 5, 0, 2, 3, 4): (1, 5, 0, 2, 3, 4),\n",
475 " (1, 5, 0, 2, 4, 3): (1, 5, 0, 2, 4, 3),\n",
476 " (1, 5, 0, 3, 2, 4): (1, 5, 0, 3, 2, 4),\n",
477 " (1, 5, 0, 3, 4, 2): (1, 5, 0, 3, 4, 2),\n",
478 " (1, 5, 0, 4, 2, 3): (1, 5, 0, 4, 2, 3),\n",
479 " (1, 5, 0, 4, 3, 2): (1, 5, 0, 4, 3, 2),\n",
480 " (1, 5, 2, 0, 3, 4): (1, 5, 2, 0, 3, 4),\n",
481 " (1, 5, 2, 0, 4, 3): (1, 5, 2, 0, 4, 3),\n",
482 " (1, 5, 2, 3, 0, 4): (1, 5, 2, 3, 0, 4),\n",
483 " (1, 5, 2, 3, 4, 0): (1, 5, 2, 3, 4, 0),\n",
484 " (1, 5, 2, 4, 0, 3): (1, 5, 2, 4, 0, 3),\n",
485 " (1, 5, 2, 4, 3, 0): (1, 5, 2, 4, 3, 0),\n",
486 " (1, 5, 3, 0, 2, 4): (1, 5, 3, 0, 2, 4),\n",
487 " (1, 5, 3, 0, 4, 2): (1, 5, 3, 0, 4, 2),\n",
488 " (1, 5, 3, 2, 0, 4): (1, 5, 3, 2, 0, 4),\n",
489 " (1, 5, 3, 2, 4, 0): (1, 5, 3, 2, 4, 0),\n",
490 " (1, 5, 3, 4, 0, 2): (1, 5, 3, 4, 0, 2),\n",
491 " (1, 5, 3, 4, 2, 0): (1, 5, 3, 4, 2, 0),\n",
492 " (1, 5, 4, 0, 2, 3): (1, 5, 4, 0, 2, 3),\n",
493 " (1, 5, 4, 0, 3, 2): (1, 5, 4, 0, 3, 2),\n",
494 " (1, 5, 4, 2, 0, 3): (1, 5, 4, 2, 0, 3),\n",
495 " (1, 5, 4, 2, 3, 0): (1, 5, 4, 2, 3, 0),\n",
496 " (1, 5, 4, 3, 0, 2): (1, 5, 4, 3, 0, 2),\n",
497 " (1, 5, 4, 3, 2, 0): (1, 5, 4, 3, 2, 0),\n",
498 " (2, 0, 1, 3, 4, 5): (2, 0, 1, 3, 4, 5),\n",
499 " (2, 0, 1, 3, 5, 4): (2, 0, 1, 3, 5, 4),\n",
500 " (2, 0, 1, 4, 3, 5): (2, 0, 1, 4, 3, 5),\n",
501 " (2, 0, 1, 4, 5, 3): (2, 0, 1, 4, 5, 3),\n",
502 " (2, 0, 1, 5, 3, 4): (2, 0, 1, 5, 3, 4),\n",
503 " (2, 0, 1, 5, 4, 3): (2, 0, 1, 5, 4, 3),\n",
504 " (2, 0, 3, 1, 4, 5): (2, 0, 3, 1, 4, 5),\n",
505 " (2, 0, 3, 1, 5, 4): (2, 0, 3, 1, 5, 4),\n",
506 " (2, 0, 3, 4, 1, 5): (2, 0, 3, 4, 1, 5),\n",
507 " (2, 0, 3, 4, 5, 1): (2, 0, 3, 4, 5, 1),\n",
508 " (2, 0, 3, 5, 1, 4): (2, 0, 3, 5, 1, 4),\n",
509 " (2, 0, 3, 5, 4, 1): (2, 0, 3, 5, 4, 1),\n",
510 " (2, 0, 4, 1, 3, 5): (2, 0, 4, 1, 3, 5),\n",
511 " (2, 0, 4, 1, 5, 3): (2, 0, 4, 1, 5, 3),\n",
512 " (2, 0, 4, 3, 1, 5): (2, 0, 4, 3, 1, 5),\n",
513 " (2, 0, 4, 3, 5, 1): (2, 0, 4, 3, 5, 1),\n",
514 " (2, 0, 4, 5, 1, 3): (2, 0, 4, 5, 1, 3),\n",
515 " (2, 0, 4, 5, 3, 1): (2, 0, 4, 5, 3, 1),\n",
516 " (2, 0, 5, 1, 3, 4): (2, 0, 5, 1, 3, 4),\n",
517 " (2, 0, 5, 1, 4, 3): (2, 0, 5, 1, 4, 3),\n",
518 " (2, 0, 5, 3, 1, 4): (2, 0, 5, 3, 1, 4),\n",
519 " (2, 0, 5, 3, 4, 1): (2, 0, 5, 3, 4, 1),\n",
520 " (2, 0, 5, 4, 1, 3): (2, 0, 5, 4, 1, 3),\n",
521 " (2, 0, 5, 4, 3, 1): (2, 0, 5, 4, 3, 1),\n",
522 " (2, 1, 0, 3, 4, 5): (2, 1, 0, 3, 4, 5),\n",
523 " (2, 1, 0, 3, 5, 4): (2, 1, 0, 3, 5, 4),\n",
524 " (2, 1, 0, 4, 3, 5): (2, 1, 0, 4, 3, 5),\n",
525 " (2, 1, 0, 4, 5, 3): (2, 1, 0, 4, 5, 3),\n",
526 " (2, 1, 0, 5, 3, 4): (2, 1, 0, 5, 3, 4),\n",
527 " (2, 1, 0, 5, 4, 3): (2, 1, 0, 5, 4, 3),\n",
528 " (2, 1, 3, 0, 4, 5): (2, 1, 3, 0, 4, 5),\n",
529 " (2, 1, 3, 0, 5, 4): (2, 1, 3, 0, 5, 4),\n",
530 " (2, 1, 3, 4, 0, 5): (2, 1, 3, 4, 0, 5),\n",
531 " (2, 1, 3, 4, 5, 0): (2, 1, 3, 4, 5, 0),\n",
532 " (2, 1, 3, 5, 0, 4): (2, 1, 3, 5, 0, 4),\n",
533 " (2, 1, 3, 5, 4, 0): (2, 1, 3, 5, 4, 0),\n",
534 " (2, 1, 4, 0, 3, 5): (2, 1, 4, 0, 3, 5),\n",
535 " (2, 1, 4, 0, 5, 3): (2, 1, 4, 0, 5, 3),\n",
536 " (2, 1, 4, 3, 0, 5): (2, 1, 4, 3, 0, 5),\n",
537 " (2, 1, 4, 3, 5, 0): (2, 1, 4, 3, 5, 0),\n",
538 " (2, 1, 4, 5, 0, 3): (2, 1, 4, 5, 0, 3),\n",
539 " (2, 1, 4, 5, 3, 0): (2, 1, 4, 5, 3, 0),\n",
540 " (2, 1, 5, 0, 3, 4): (2, 1, 5, 0, 3, 4),\n",
541 " (2, 1, 5, 0, 4, 3): (2, 1, 5, 0, 4, 3),\n",
542 " (2, 1, 5, 3, 0, 4): (2, 1, 5, 3, 0, 4),\n",
543 " (2, 1, 5, 3, 4, 0): (2, 1, 5, 3, 4, 0),\n",
544 " (2, 1, 5, 4, 0, 3): (2, 1, 5, 4, 0, 3),\n",
545 " (2, 1, 5, 4, 3, 0): (2, 1, 5, 4, 3, 0),\n",
546 " (2, 3, 0, 1, 4, 5): (2, 3, 0, 1, 4, 5),\n",
547 " (2, 3, 0, 1, 5, 4): (2, 3, 0, 1, 5, 4),\n",
548 " (2, 3, 0, 4, 1, 5): (2, 3, 0, 4, 1, 5),\n",
549 " (2, 3, 0, 4, 5, 1): (2, 3, 0, 4, 5, 1),\n",
550 " (2, 3, 0, 5, 1, 4): (2, 3, 0, 5, 1, 4),\n",
551 " (2, 3, 0, 5, 4, 1): (2, 3, 0, 5, 4, 1),\n",
552 " (2, 3, 1, 0, 4, 5): (2, 3, 1, 0, 4, 5),\n",
553 " (2, 3, 1, 0, 5, 4): (2, 3, 1, 0, 5, 4),\n",
554 " (2, 3, 1, 4, 0, 5): (2, 3, 1, 4, 0, 5),\n",
555 " (2, 3, 1, 4, 5, 0): (2, 3, 1, 4, 5, 0),\n",
556 " (2, 3, 1, 5, 0, 4): (2, 3, 1, 5, 0, 4),\n",
557 " (2, 3, 1, 5, 4, 0): (2, 3, 1, 5, 4, 0),\n",
558 " (2, 3, 4, 0, 1, 5): (2, 3, 4, 0, 1, 5),\n",
559 " (2, 3, 4, 0, 5, 1): (2, 3, 4, 0, 5, 1),\n",
560 " (2, 3, 4, 1, 0, 5): (2, 3, 4, 1, 0, 5),\n",
561 " (2, 3, 4, 1, 5, 0): (2, 3, 4, 1, 5, 0),\n",
562 " (2, 3, 4, 5, 0, 1): (2, 3, 4, 5, 0, 1),\n",
563 " (2, 3, 4, 5, 1, 0): (2, 3, 4, 5, 1, 0),\n",
564 " (2, 3, 5, 0, 1, 4): (2, 3, 5, 0, 1, 4),\n",
565 " (2, 3, 5, 0, 4, 1): (2, 3, 5, 0, 4, 1),\n",
566 " (2, 3, 5, 1, 0, 4): (2, 3, 5, 1, 0, 4),\n",
567 " (2, 3, 5, 1, 4, 0): (2, 3, 5, 1, 4, 0),\n",
568 " (2, 3, 5, 4, 0, 1): (2, 3, 5, 4, 0, 1),\n",
569 " (2, 3, 5, 4, 1, 0): (2, 3, 5, 4, 1, 0),\n",
570 " (2, 4, 0, 1, 3, 5): (2, 4, 0, 1, 3, 5),\n",
571 " (2, 4, 0, 1, 5, 3): (2, 4, 0, 1, 5, 3),\n",
572 " (2, 4, 0, 3, 1, 5): (2, 4, 0, 3, 1, 5),\n",
573 " (2, 4, 0, 3, 5, 1): (2, 4, 0, 3, 5, 1),\n",
574 " (2, 4, 0, 5, 1, 3): (2, 4, 0, 5, 1, 3),\n",
575 " (2, 4, 0, 5, 3, 1): (2, 4, 0, 5, 3, 1),\n",
576 " (2, 4, 1, 0, 3, 5): (2, 4, 1, 0, 3, 5),\n",
577 " (2, 4, 1, 0, 5, 3): (2, 4, 1, 0, 5, 3),\n",
578 " (2, 4, 1, 3, 0, 5): (2, 4, 1, 3, 0, 5),\n",
579 " (2, 4, 1, 3, 5, 0): (2, 4, 1, 3, 5, 0),\n",
580 " (2, 4, 1, 5, 0, 3): (2, 4, 1, 5, 0, 3),\n",
581 " (2, 4, 1, 5, 3, 0): (2, 4, 1, 5, 3, 0),\n",
582 " (2, 4, 3, 0, 1, 5): (2, 4, 3, 0, 1, 5),\n",
583 " (2, 4, 3, 0, 5, 1): (2, 4, 3, 0, 5, 1),\n",
584 " (2, 4, 3, 1, 0, 5): (2, 4, 3, 1, 0, 5),\n",
585 " (2, 4, 3, 1, 5, 0): (2, 4, 3, 1, 5, 0),\n",
586 " (2, 4, 3, 5, 0, 1): (2, 4, 3, 5, 0, 1),\n",
587 " (2, 4, 3, 5, 1, 0): (2, 4, 3, 5, 1, 0),\n",
588 " (2, 4, 5, 0, 1, 3): (2, 4, 5, 0, 1, 3),\n",
589 " (2, 4, 5, 0, 3, 1): (2, 4, 5, 0, 3, 1),\n",
590 " (2, 4, 5, 1, 0, 3): (2, 4, 5, 1, 0, 3),\n",
591 " (2, 4, 5, 1, 3, 0): (2, 4, 5, 1, 3, 0),\n",
592 " (2, 4, 5, 3, 0, 1): (2, 4, 5, 3, 0, 1),\n",
593 " (2, 4, 5, 3, 1, 0): (2, 4, 5, 3, 1, 0),\n",
594 " (2, 5, 0, 1, 3, 4): (2, 5, 0, 1, 3, 4),\n",
595 " (2, 5, 0, 1, 4, 3): (2, 5, 0, 1, 4, 3),\n",
596 " (2, 5, 0, 3, 1, 4): (2, 5, 0, 3, 1, 4),\n",
597 " (2, 5, 0, 3, 4, 1): (2, 5, 0, 3, 4, 1),\n",
598 " (2, 5, 0, 4, 1, 3): (2, 5, 0, 4, 1, 3),\n",
599 " (2, 5, 0, 4, 3, 1): (2, 5, 0, 4, 3, 1),\n",
600 " (2, 5, 1, 0, 3, 4): (2, 5, 1, 0, 3, 4),\n",
601 " (2, 5, 1, 0, 4, 3): (2, 5, 1, 0, 4, 3),\n",
602 " (2, 5, 1, 3, 0, 4): (2, 5, 1, 3, 0, 4),\n",
603 " (2, 5, 1, 3, 4, 0): (2, 5, 1, 3, 4, 0),\n",
604 " (2, 5, 1, 4, 0, 3): (2, 5, 1, 4, 0, 3),\n",
605 " (2, 5, 1, 4, 3, 0): (2, 5, 1, 4, 3, 0),\n",
606 " (2, 5, 3, 0, 1, 4): (2, 5, 3, 0, 1, 4),\n",
607 " (2, 5, 3, 0, 4, 1): (2, 5, 3, 0, 4, 1),\n",
608 " (2, 5, 3, 1, 0, 4): (2, 5, 3, 1, 0, 4),\n",
609 " (2, 5, 3, 1, 4, 0): (2, 5, 3, 1, 4, 0),\n",
610 " (2, 5, 3, 4, 0, 1): (2, 5, 3, 4, 0, 1),\n",
611 " (2, 5, 3, 4, 1, 0): (2, 5, 3, 4, 1, 0),\n",
612 " (2, 5, 4, 0, 1, 3): (2, 5, 4, 0, 1, 3),\n",
613 " (2, 5, 4, 0, 3, 1): (2, 5, 4, 0, 3, 1),\n",
614 " (2, 5, 4, 1, 0, 3): (2, 5, 4, 1, 0, 3),\n",
615 " (2, 5, 4, 1, 3, 0): (2, 5, 4, 1, 3, 0),\n",
616 " (2, 5, 4, 3, 0, 1): (2, 5, 4, 3, 0, 1),\n",
617 " (2, 5, 4, 3, 1, 0): (2, 5, 4, 3, 1, 0),\n",
618 " (3, 0, 1, 2, 4, 5): (3, 0, 1, 2, 4, 5),\n",
619 " (3, 0, 1, 2, 5, 4): (3, 0, 1, 2, 5, 4),\n",
620 " (3, 0, 1, 4, 2, 5): (3, 0, 1, 4, 2, 5),\n",
621 " (3, 0, 1, 4, 5, 2): (3, 0, 1, 4, 5, 2),\n",
622 " (3, 0, 1, 5, 2, 4): (3, 0, 1, 5, 2, 4),\n",
623 " (3, 0, 1, 5, 4, 2): (3, 0, 1, 5, 4, 2),\n",
624 " (3, 0, 2, 1, 4, 5): (3, 0, 2, 1, 4, 5),\n",
625 " (3, 0, 2, 1, 5, 4): (3, 0, 2, 1, 5, 4),\n",
626 " (3, 0, 2, 4, 1, 5): (3, 0, 2, 4, 1, 5),\n",
627 " (3, 0, 2, 4, 5, 1): (3, 0, 2, 4, 5, 1),\n",
628 " (3, 0, 2, 5, 1, 4): (3, 0, 2, 5, 1, 4),\n",
629 " (3, 0, 2, 5, 4, 1): (3, 0, 2, 5, 4, 1),\n",
630 " (3, 0, 4, 1, 2, 5): (3, 0, 4, 1, 2, 5),\n",
631 " (3, 0, 4, 1, 5, 2): (3, 0, 4, 1, 5, 2),\n",
632 " (3, 0, 4, 2, 1, 5): (3, 0, 4, 2, 1, 5),\n",
633 " (3, 0, 4, 2, 5, 1): (3, 0, 4, 2, 5, 1),\n",
634 " (3, 0, 4, 5, 1, 2): (3, 0, 4, 5, 1, 2),\n",
635 " (3, 0, 4, 5, 2, 1): (3, 0, 4, 5, 2, 1),\n",
636 " (3, 0, 5, 1, 2, 4): (3, 0, 5, 1, 2, 4),\n",
637 " (3, 0, 5, 1, 4, 2): (3, 0, 5, 1, 4, 2),\n",
638 " (3, 0, 5, 2, 1, 4): (3, 0, 5, 2, 1, 4),\n",
639 " (3, 0, 5, 2, 4, 1): (3, 0, 5, 2, 4, 1),\n",
640 " (3, 0, 5, 4, 1, 2): (3, 0, 5, 4, 1, 2),\n",
641 " (3, 0, 5, 4, 2, 1): (3, 0, 5, 4, 2, 1),\n",
642 " (3, 1, 0, 2, 4, 5): (3, 1, 0, 2, 4, 5),\n",
643 " (3, 1, 0, 2, 5, 4): (3, 1, 0, 2, 5, 4),\n",
644 " (3, 1, 0, 4, 2, 5): (3, 1, 0, 4, 2, 5),\n",
645 " (3, 1, 0, 4, 5, 2): (3, 1, 0, 4, 5, 2),\n",
646 " (3, 1, 0, 5, 2, 4): (3, 1, 0, 5, 2, 4),\n",
647 " (3, 1, 0, 5, 4, 2): (3, 1, 0, 5, 4, 2),\n",
648 " (3, 1, 2, 0, 4, 5): (3, 1, 2, 0, 4, 5),\n",
649 " (3, 1, 2, 0, 5, 4): (3, 1, 2, 0, 5, 4),\n",
650 " (3, 1, 2, 4, 0, 5): (3, 1, 2, 4, 0, 5),\n",
651 " (3, 1, 2, 4, 5, 0): (3, 1, 2, 4, 5, 0),\n",
652 " (3, 1, 2, 5, 0, 4): (3, 1, 2, 5, 0, 4),\n",
653 " (3, 1, 2, 5, 4, 0): (3, 1, 2, 5, 4, 0),\n",
654 " (3, 1, 4, 0, 2, 5): (3, 1, 4, 0, 2, 5),\n",
655 " (3, 1, 4, 0, 5, 2): (3, 1, 4, 0, 5, 2),\n",
656 " (3, 1, 4, 2, 0, 5): (3, 1, 4, 2, 0, 5),\n",
657 " (3, 1, 4, 2, 5, 0): (3, 1, 4, 2, 5, 0),\n",
658 " (3, 1, 4, 5, 0, 2): (3, 1, 4, 5, 0, 2),\n",
659 " (3, 1, 4, 5, 2, 0): (3, 1, 4, 5, 2, 0),\n",
660 " (3, 1, 5, 0, 2, 4): (3, 1, 5, 0, 2, 4),\n",
661 " (3, 1, 5, 0, 4, 2): (3, 1, 5, 0, 4, 2),\n",
662 " (3, 1, 5, 2, 0, 4): (3, 1, 5, 2, 0, 4),\n",
663 " (3, 1, 5, 2, 4, 0): (3, 1, 5, 2, 4, 0),\n",
664 " (3, 1, 5, 4, 0, 2): (3, 1, 5, 4, 0, 2),\n",
665 " (3, 1, 5, 4, 2, 0): (3, 1, 5, 4, 2, 0),\n",
666 " (3, 2, 0, 1, 4, 5): (3, 2, 0, 1, 4, 5),\n",
667 " (3, 2, 0, 1, 5, 4): (3, 2, 0, 1, 5, 4),\n",
668 " (3, 2, 0, 4, 1, 5): (3, 2, 0, 4, 1, 5),\n",
669 " (3, 2, 0, 4, 5, 1): (3, 2, 0, 4, 5, 1),\n",
670 " (3, 2, 0, 5, 1, 4): (3, 2, 0, 5, 1, 4),\n",
671 " (3, 2, 0, 5, 4, 1): (3, 2, 0, 5, 4, 1),\n",
672 " (3, 2, 1, 0, 4, 5): (3, 2, 1, 0, 4, 5),\n",
673 " (3, 2, 1, 0, 5, 4): (3, 2, 1, 0, 5, 4),\n",
674 " (3, 2, 1, 4, 0, 5): (3, 2, 1, 4, 0, 5),\n",
675 " (3, 2, 1, 4, 5, 0): (3, 2, 1, 4, 5, 0),\n",
676 " (3, 2, 1, 5, 0, 4): (3, 2, 1, 5, 0, 4),\n",
677 " (3, 2, 1, 5, 4, 0): (3, 2, 1, 5, 4, 0),\n",
678 " (3, 2, 4, 0, 1, 5): (3, 2, 4, 0, 1, 5),\n",
679 " (3, 2, 4, 0, 5, 1): (3, 2, 4, 0, 5, 1),\n",
680 " (3, 2, 4, 1, 0, 5): (3, 2, 4, 1, 0, 5),\n",
681 " (3, 2, 4, 1, 5, 0): (3, 2, 4, 1, 5, 0),\n",
682 " (3, 2, 4, 5, 0, 1): (3, 2, 4, 5, 0, 1),\n",
683 " (3, 2, 4, 5, 1, 0): (3, 2, 4, 5, 1, 0),\n",
684 " (3, 2, 5, 0, 1, 4): (3, 2, 5, 0, 1, 4),\n",
685 " (3, 2, 5, 0, 4, 1): (3, 2, 5, 0, 4, 1),\n",
686 " (3, 2, 5, 1, 0, 4): (3, 2, 5, 1, 0, 4),\n",
687 " (3, 2, 5, 1, 4, 0): (3, 2, 5, 1, 4, 0),\n",
688 " (3, 2, 5, 4, 0, 1): (3, 2, 5, 4, 0, 1),\n",
689 " (3, 2, 5, 4, 1, 0): (3, 2, 5, 4, 1, 0),\n",
690 " (3, 4, 0, 1, 2, 5): (3, 4, 0, 1, 2, 5),\n",
691 " (3, 4, 0, 1, 5, 2): (3, 4, 0, 1, 5, 2),\n",
692 " (3, 4, 0, 2, 1, 5): (3, 4, 0, 2, 1, 5),\n",
693 " (3, 4, 0, 2, 5, 1): (3, 4, 0, 2, 5, 1),\n",
694 " (3, 4, 0, 5, 1, 2): (3, 4, 0, 5, 1, 2),\n",
695 " (3, 4, 0, 5, 2, 1): (3, 4, 0, 5, 2, 1),\n",
696 " (3, 4, 1, 0, 2, 5): (3, 4, 1, 0, 2, 5),\n",
697 " (3, 4, 1, 0, 5, 2): (3, 4, 1, 0, 5, 2),\n",
698 " (3, 4, 1, 2, 0, 5): (3, 4, 1, 2, 0, 5),\n",
699 " (3, 4, 1, 2, 5, 0): (3, 4, 1, 2, 5, 0),\n",
700 " (3, 4, 1, 5, 0, 2): (3, 4, 1, 5, 0, 2),\n",
701 " (3, 4, 1, 5, 2, 0): (3, 4, 1, 5, 2, 0),\n",
702 " (3, 4, 2, 0, 1, 5): (3, 4, 2, 0, 1, 5),\n",
703 " (3, 4, 2, 0, 5, 1): (3, 4, 2, 0, 5, 1),\n",
704 " (3, 4, 2, 1, 0, 5): (3, 4, 2, 1, 0, 5),\n",
705 " (3, 4, 2, 1, 5, 0): (3, 4, 2, 1, 5, 0),\n",
706 " (3, 4, 2, 5, 0, 1): (3, 4, 2, 5, 0, 1),\n",
707 " (3, 4, 2, 5, 1, 0): (3, 4, 2, 5, 1, 0),\n",
708 " (3, 4, 5, 0, 1, 2): (3, 4, 5, 0, 1, 2),\n",
709 " (3, 4, 5, 0, 2, 1): (3, 4, 5, 0, 2, 1),\n",
710 " (3, 4, 5, 1, 0, 2): (3, 4, 5, 1, 0, 2),\n",
711 " (3, 4, 5, 1, 2, 0): (3, 4, 5, 1, 2, 0),\n",
712 " (3, 4, 5, 2, 0, 1): (3, 4, 5, 2, 0, 1),\n",
713 " (3, 4, 5, 2, 1, 0): (3, 4, 5, 2, 1, 0),\n",
714 " (3, 5, 0, 1, 2, 4): (3, 5, 0, 1, 2, 4),\n",
715 " (3, 5, 0, 1, 4, 2): (3, 5, 0, 1, 4, 2),\n",
716 " (3, 5, 0, 2, 1, 4): (3, 5, 0, 2, 1, 4),\n",
717 " (3, 5, 0, 2, 4, 1): (3, 5, 0, 2, 4, 1),\n",
718 " (3, 5, 0, 4, 1, 2): (3, 5, 0, 4, 1, 2),\n",
719 " (3, 5, 0, 4, 2, 1): (3, 5, 0, 4, 2, 1),\n",
720 " (3, 5, 1, 0, 2, 4): (3, 5, 1, 0, 2, 4),\n",
721 " (3, 5, 1, 0, 4, 2): (3, 5, 1, 0, 4, 2),\n",
722 " (3, 5, 1, 2, 0, 4): (3, 5, 1, 2, 0, 4),\n",
723 " (3, 5, 1, 2, 4, 0): (3, 5, 1, 2, 4, 0),\n",
724 " (3, 5, 1, 4, 0, 2): (3, 5, 1, 4, 0, 2),\n",
725 " (3, 5, 1, 4, 2, 0): (3, 5, 1, 4, 2, 0),\n",
726 " (3, 5, 2, 0, 1, 4): (3, 5, 2, 0, 1, 4),\n",
727 " (3, 5, 2, 0, 4, 1): (3, 5, 2, 0, 4, 1),\n",
728 " (3, 5, 2, 1, 0, 4): (3, 5, 2, 1, 0, 4),\n",
729 " (3, 5, 2, 1, 4, 0): (3, 5, 2, 1, 4, 0),\n",
730 " (3, 5, 2, 4, 0, 1): (3, 5, 2, 4, 0, 1),\n",
731 " (3, 5, 2, 4, 1, 0): (3, 5, 2, 4, 1, 0),\n",
732 " (3, 5, 4, 0, 1, 2): (3, 5, 4, 0, 1, 2),\n",
733 " (3, 5, 4, 0, 2, 1): (3, 5, 4, 0, 2, 1),\n",
734 " (3, 5, 4, 1, 0, 2): (3, 5, 4, 1, 0, 2),\n",
735 " (3, 5, 4, 1, 2, 0): (3, 5, 4, 1, 2, 0),\n",
736 " (3, 5, 4, 2, 0, 1): (3, 5, 4, 2, 0, 1),\n",
737 " (3, 5, 4, 2, 1, 0): (3, 5, 4, 2, 1, 0),\n",
738 " (4, 0, 1, 2, 3, 5): (4, 0, 1, 2, 3, 5),\n",
739 " (4, 0, 1, 2, 5, 3): (4, 0, 1, 2, 5, 3),\n",
740 " (4, 0, 1, 3, 2, 5): (4, 0, 1, 3, 2, 5),\n",
741 " (4, 0, 1, 3, 5, 2): (4, 0, 1, 3, 5, 2),\n",
742 " (4, 0, 1, 5, 2, 3): (4, 0, 1, 5, 2, 3),\n",
743 " (4, 0, 1, 5, 3, 2): (4, 0, 1, 5, 3, 2),\n",
744 " (4, 0, 2, 1, 3, 5): (4, 0, 2, 1, 3, 5),\n",
745 " (4, 0, 2, 1, 5, 3): (4, 0, 2, 1, 5, 3),\n",
746 " (4, 0, 2, 3, 1, 5): (4, 0, 2, 3, 1, 5),\n",
747 " (4, 0, 2, 3, 5, 1): (4, 0, 2, 3, 5, 1),\n",
748 " (4, 0, 2, 5, 1, 3): (4, 0, 2, 5, 1, 3),\n",
749 " (4, 0, 2, 5, 3, 1): (4, 0, 2, 5, 3, 1),\n",
750 " (4, 0, 3, 1, 2, 5): (4, 0, 3, 1, 2, 5),\n",
751 " (4, 0, 3, 1, 5, 2): (4, 0, 3, 1, 5, 2),\n",
752 " (4, 0, 3, 2, 1, 5): (4, 0, 3, 2, 1, 5),\n",
753 " (4, 0, 3, 2, 5, 1): (4, 0, 3, 2, 5, 1),\n",
754 " (4, 0, 3, 5, 1, 2): (4, 0, 3, 5, 1, 2),\n",
755 " (4, 0, 3, 5, 2, 1): (4, 0, 3, 5, 2, 1),\n",
756 " (4, 0, 5, 1, 2, 3): (4, 0, 5, 1, 2, 3),\n",
757 " (4, 0, 5, 1, 3, 2): (4, 0, 5, 1, 3, 2),\n",
758 " (4, 0, 5, 2, 1, 3): (4, 0, 5, 2, 1, 3),\n",
759 " (4, 0, 5, 2, 3, 1): (4, 0, 5, 2, 3, 1),\n",
760 " (4, 0, 5, 3, 1, 2): (4, 0, 5, 3, 1, 2),\n",
761 " (4, 0, 5, 3, 2, 1): (4, 0, 5, 3, 2, 1),\n",
762 " (4, 1, 0, 2, 3, 5): (4, 1, 0, 2, 3, 5),\n",
763 " (4, 1, 0, 2, 5, 3): (4, 1, 0, 2, 5, 3),\n",
764 " (4, 1, 0, 3, 2, 5): (4, 1, 0, 3, 2, 5),\n",
765 " (4, 1, 0, 3, 5, 2): (4, 1, 0, 3, 5, 2),\n",
766 " (4, 1, 0, 5, 2, 3): (4, 1, 0, 5, 2, 3),\n",
767 " (4, 1, 0, 5, 3, 2): (4, 1, 0, 5, 3, 2),\n",
768 " (4, 1, 2, 0, 3, 5): (4, 1, 2, 0, 3, 5),\n",
769 " (4, 1, 2, 0, 5, 3): (4, 1, 2, 0, 5, 3),\n",
770 " (4, 1, 2, 3, 0, 5): (4, 1, 2, 3, 0, 5),\n",
771 " (4, 1, 2, 3, 5, 0): (4, 1, 2, 3, 5, 0),\n",
772 " (4, 1, 2, 5, 0, 3): (4, 1, 2, 5, 0, 3),\n",
773 " (4, 1, 2, 5, 3, 0): (4, 1, 2, 5, 3, 0),\n",
774 " (4, 1, 3, 0, 2, 5): (4, 1, 3, 0, 2, 5),\n",
775 " (4, 1, 3, 0, 5, 2): (4, 1, 3, 0, 5, 2),\n",
776 " (4, 1, 3, 2, 0, 5): (4, 1, 3, 2, 0, 5),\n",
777 " (4, 1, 3, 2, 5, 0): (4, 1, 3, 2, 5, 0),\n",
778 " (4, 1, 3, 5, 0, 2): (4, 1, 3, 5, 0, 2),\n",
779 " (4, 1, 3, 5, 2, 0): (4, 1, 3, 5, 2, 0),\n",
780 " (4, 1, 5, 0, 2, 3): (4, 1, 5, 0, 2, 3),\n",
781 " (4, 1, 5, 0, 3, 2): (4, 1, 5, 0, 3, 2),\n",
782 " (4, 1, 5, 2, 0, 3): (4, 1, 5, 2, 0, 3),\n",
783 " (4, 1, 5, 2, 3, 0): (4, 1, 5, 2, 3, 0),\n",
784 " (4, 1, 5, 3, 0, 2): (4, 1, 5, 3, 0, 2),\n",
785 " (4, 1, 5, 3, 2, 0): (4, 1, 5, 3, 2, 0),\n",
786 " (4, 2, 0, 1, 3, 5): (4, 2, 0, 1, 3, 5),\n",
787 " (4, 2, 0, 1, 5, 3): (4, 2, 0, 1, 5, 3),\n",
788 " (4, 2, 0, 3, 1, 5): (4, 2, 0, 3, 1, 5),\n",
789 " (4, 2, 0, 3, 5, 1): (4, 2, 0, 3, 5, 1),\n",
790 " (4, 2, 0, 5, 1, 3): (4, 2, 0, 5, 1, 3),\n",
791 " (4, 2, 0, 5, 3, 1): (4, 2, 0, 5, 3, 1),\n",
792 " (4, 2, 1, 0, 3, 5): (4, 2, 1, 0, 3, 5),\n",
793 " (4, 2, 1, 0, 5, 3): (4, 2, 1, 0, 5, 3),\n",
794 " (4, 2, 1, 3, 0, 5): (4, 2, 1, 3, 0, 5),\n",
795 " (4, 2, 1, 3, 5, 0): (4, 2, 1, 3, 5, 0),\n",
796 " (4, 2, 1, 5, 0, 3): (4, 2, 1, 5, 0, 3),\n",
797 " (4, 2, 1, 5, 3, 0): (4, 2, 1, 5, 3, 0),\n",
798 " (4, 2, 3, 0, 1, 5): (4, 2, 3, 0, 1, 5),\n",
799 " (4, 2, 3, 0, 5, 1): (4, 2, 3, 0, 5, 1),\n",
800 " (4, 2, 3, 1, 0, 5): (4, 2, 3, 1, 0, 5),\n",
801 " (4, 2, 3, 1, 5, 0): (4, 2, 3, 1, 5, 0),\n",
802 " (4, 2, 3, 5, 0, 1): (4, 2, 3, 5, 0, 1),\n",
803 " (4, 2, 3, 5, 1, 0): (4, 2, 3, 5, 1, 0),\n",
804 " (4, 2, 5, 0, 1, 3): (4, 2, 5, 0, 1, 3),\n",
805 " (4, 2, 5, 0, 3, 1): (4, 2, 5, 0, 3, 1),\n",
806 " (4, 2, 5, 1, 0, 3): (4, 2, 5, 1, 0, 3),\n",
807 " (4, 2, 5, 1, 3, 0): (4, 2, 5, 1, 3, 0),\n",
808 " (4, 2, 5, 3, 0, 1): (4, 2, 5, 3, 0, 1),\n",
809 " (4, 2, 5, 3, 1, 0): (4, 2, 5, 3, 1, 0),\n",
810 " (4, 3, 0, 1, 2, 5): (4, 3, 0, 1, 2, 5),\n",
811 " (4, 3, 0, 1, 5, 2): (4, 3, 0, 1, 5, 2),\n",
812 " (4, 3, 0, 2, 1, 5): (4, 3, 0, 2, 1, 5),\n",
813 " (4, 3, 0, 2, 5, 1): (4, 3, 0, 2, 5, 1),\n",
814 " (4, 3, 0, 5, 1, 2): (4, 3, 0, 5, 1, 2),\n",
815 " (4, 3, 0, 5, 2, 1): (4, 3, 0, 5, 2, 1),\n",
816 " (4, 3, 1, 0, 2, 5): (4, 3, 1, 0, 2, 5),\n",
817 " (4, 3, 1, 0, 5, 2): (4, 3, 1, 0, 5, 2),\n",
818 " (4, 3, 1, 2, 0, 5): (4, 3, 1, 2, 0, 5),\n",
819 " (4, 3, 1, 2, 5, 0): (4, 3, 1, 2, 5, 0),\n",
820 " (4, 3, 1, 5, 0, 2): (4, 3, 1, 5, 0, 2),\n",
821 " (4, 3, 1, 5, 2, 0): (4, 3, 1, 5, 2, 0),\n",
822 " (4, 3, 2, 0, 1, 5): (4, 3, 2, 0, 1, 5),\n",
823 " (4, 3, 2, 0, 5, 1): (4, 3, 2, 0, 5, 1),\n",
824 " (4, 3, 2, 1, 0, 5): (4, 3, 2, 1, 0, 5),\n",
825 " (4, 3, 2, 1, 5, 0): (4, 3, 2, 1, 5, 0),\n",
826 " (4, 3, 2, 5, 0, 1): (4, 3, 2, 5, 0, 1),\n",
827 " (4, 3, 2, 5, 1, 0): (4, 3, 2, 5, 1, 0),\n",
828 " (4, 3, 5, 0, 1, 2): (4, 3, 5, 0, 1, 2),\n",
829 " (4, 3, 5, 0, 2, 1): (4, 3, 5, 0, 2, 1),\n",
830 " (4, 3, 5, 1, 0, 2): (4, 3, 5, 1, 0, 2),\n",
831 " (4, 3, 5, 1, 2, 0): (4, 3, 5, 1, 2, 0),\n",
832 " (4, 3, 5, 2, 0, 1): (4, 3, 5, 2, 0, 1),\n",
833 " (4, 3, 5, 2, 1, 0): (4, 3, 5, 2, 1, 0),\n",
834 " (4, 5, 0, 1, 2, 3): (4, 5, 0, 1, 2, 3),\n",
835 " (4, 5, 0, 1, 3, 2): (4, 5, 0, 1, 3, 2),\n",
836 " (4, 5, 0, 2, 1, 3): (4, 5, 0, 2, 1, 3),\n",
837 " (4, 5, 0, 2, 3, 1): (4, 5, 0, 2, 3, 1),\n",
838 " (4, 5, 0, 3, 1, 2): (4, 5, 0, 3, 1, 2),\n",
839 " (4, 5, 0, 3, 2, 1): (4, 5, 0, 3, 2, 1),\n",
840 " (4, 5, 1, 0, 2, 3): (4, 5, 1, 0, 2, 3),\n",
841 " (4, 5, 1, 0, 3, 2): (4, 5, 1, 0, 3, 2),\n",
842 " (4, 5, 1, 2, 0, 3): (4, 5, 1, 2, 0, 3),\n",
843 " (4, 5, 1, 2, 3, 0): (4, 5, 1, 2, 3, 0),\n",
844 " (4, 5, 1, 3, 0, 2): (4, 5, 1, 3, 0, 2),\n",
845 " (4, 5, 1, 3, 2, 0): (4, 5, 1, 3, 2, 0),\n",
846 " (4, 5, 2, 0, 1, 3): (4, 5, 2, 0, 1, 3),\n",
847 " (4, 5, 2, 0, 3, 1): (4, 5, 2, 0, 3, 1),\n",
848 " (4, 5, 2, 1, 0, 3): (4, 5, 2, 1, 0, 3),\n",
849 " (4, 5, 2, 1, 3, 0): (4, 5, 2, 1, 3, 0),\n",
850 " (4, 5, 2, 3, 0, 1): (4, 5, 2, 3, 0, 1),\n",
851 " (4, 5, 2, 3, 1, 0): (4, 5, 2, 3, 1, 0),\n",
852 " (4, 5, 3, 0, 1, 2): (4, 5, 3, 0, 1, 2),\n",
853 " (4, 5, 3, 0, 2, 1): (4, 5, 3, 0, 2, 1),\n",
854 " (4, 5, 3, 1, 0, 2): (4, 5, 3, 1, 0, 2),\n",
855 " (4, 5, 3, 1, 2, 0): (4, 5, 3, 1, 2, 0),\n",
856 " (4, 5, 3, 2, 0, 1): (4, 5, 3, 2, 0, 1),\n",
857 " (4, 5, 3, 2, 1, 0): (4, 5, 3, 2, 1, 0),\n",
858 " (5, 0, 1, 2, 3, 4): (5, 0, 1, 2, 3, 4),\n",
859 " (5, 0, 1, 2, 4, 3): (5, 0, 1, 2, 4, 3),\n",
860 " (5, 0, 1, 3, 2, 4): (5, 0, 1, 3, 2, 4),\n",
861 " (5, 0, 1, 3, 4, 2): (5, 0, 1, 3, 4, 2),\n",
862 " (5, 0, 1, 4, 2, 3): (5, 0, 1, 4, 2, 3),\n",
863 " (5, 0, 1, 4, 3, 2): (5, 0, 1, 4, 3, 2),\n",
864 " (5, 0, 2, 1, 3, 4): (5, 0, 2, 1, 3, 4),\n",
865 " (5, 0, 2, 1, 4, 3): (5, 0, 2, 1, 4, 3),\n",
866 " (5, 0, 2, 3, 1, 4): (5, 0, 2, 3, 1, 4),\n",
867 " (5, 0, 2, 3, 4, 1): (5, 0, 2, 3, 4, 1),\n",
868 " (5, 0, 2, 4, 1, 3): (5, 0, 2, 4, 1, 3),\n",
869 " (5, 0, 2, 4, 3, 1): (5, 0, 2, 4, 3, 1),\n",
870 " (5, 0, 3, 1, 2, 4): (5, 0, 3, 1, 2, 4),\n",
871 " (5, 0, 3, 1, 4, 2): (5, 0, 3, 1, 4, 2),\n",
872 " (5, 0, 3, 2, 1, 4): (5, 0, 3, 2, 1, 4),\n",
873 " (5, 0, 3, 2, 4, 1): (5, 0, 3, 2, 4, 1),\n",
874 " (5, 0, 3, 4, 1, 2): (5, 0, 3, 4, 1, 2),\n",
875 " (5, 0, 3, 4, 2, 1): (5, 0, 3, 4, 2, 1),\n",
876 " (5, 0, 4, 1, 2, 3): (5, 0, 4, 1, 2, 3),\n",
877 " (5, 0, 4, 1, 3, 2): (5, 0, 4, 1, 3, 2),\n",
878 " (5, 0, 4, 2, 1, 3): (5, 0, 4, 2, 1, 3),\n",
879 " (5, 0, 4, 2, 3, 1): (5, 0, 4, 2, 3, 1),\n",
880 " (5, 0, 4, 3, 1, 2): (5, 0, 4, 3, 1, 2),\n",
881 " (5, 0, 4, 3, 2, 1): (5, 0, 4, 3, 2, 1),\n",
882 " (5, 1, 0, 2, 3, 4): (5, 1, 0, 2, 3, 4),\n",
883 " (5, 1, 0, 2, 4, 3): (5, 1, 0, 2, 4, 3),\n",
884 " (5, 1, 0, 3, 2, 4): (5, 1, 0, 3, 2, 4),\n",
885 " (5, 1, 0, 3, 4, 2): (5, 1, 0, 3, 4, 2),\n",
886 " (5, 1, 0, 4, 2, 3): (5, 1, 0, 4, 2, 3),\n",
887 " (5, 1, 0, 4, 3, 2): (5, 1, 0, 4, 3, 2),\n",
888 " (5, 1, 2, 0, 3, 4): (5, 1, 2, 0, 3, 4),\n",
889 " (5, 1, 2, 0, 4, 3): (5, 1, 2, 0, 4, 3),\n",
890 " (5, 1, 2, 3, 0, 4): (5, 1, 2, 3, 0, 4),\n",
891 " (5, 1, 2, 3, 4, 0): (5, 1, 2, 3, 4, 0),\n",
892 " (5, 1, 2, 4, 0, 3): (5, 1, 2, 4, 0, 3),\n",
893 " (5, 1, 2, 4, 3, 0): (5, 1, 2, 4, 3, 0),\n",
894 " (5, 1, 3, 0, 2, 4): (5, 1, 3, 0, 2, 4),\n",
895 " (5, 1, 3, 0, 4, 2): (5, 1, 3, 0, 4, 2),\n",
896 " (5, 1, 3, 2, 0, 4): (5, 1, 3, 2, 0, 4),\n",
897 " (5, 1, 3, 2, 4, 0): (5, 1, 3, 2, 4, 0),\n",
898 " (5, 1, 3, 4, 0, 2): (5, 1, 3, 4, 0, 2),\n",
899 " (5, 1, 3, 4, 2, 0): (5, 1, 3, 4, 2, 0),\n",
900 " (5, 1, 4, 0, 2, 3): (5, 1, 4, 0, 2, 3),\n",
901 " (5, 1, 4, 0, 3, 2): (5, 1, 4, 0, 3, 2),\n",
902 " (5, 1, 4, 2, 0, 3): (5, 1, 4, 2, 0, 3),\n",
903 " (5, 1, 4, 2, 3, 0): (5, 1, 4, 2, 3, 0),\n",
904 " (5, 1, 4, 3, 0, 2): (5, 1, 4, 3, 0, 2),\n",
905 " (5, 1, 4, 3, 2, 0): (5, 1, 4, 3, 2, 0),\n",
906 " (5, 2, 0, 1, 3, 4): (5, 2, 0, 1, 3, 4),\n",
907 " (5, 2, 0, 1, 4, 3): (5, 2, 0, 1, 4, 3),\n",
908 " (5, 2, 0, 3, 1, 4): (5, 2, 0, 3, 1, 4),\n",
909 " (5, 2, 0, 3, 4, 1): (5, 2, 0, 3, 4, 1),\n",
910 " (5, 2, 0, 4, 1, 3): (5, 2, 0, 4, 1, 3),\n",
911 " (5, 2, 0, 4, 3, 1): (5, 2, 0, 4, 3, 1),\n",
912 " (5, 2, 1, 0, 3, 4): (5, 2, 1, 0, 3, 4),\n",
913 " (5, 2, 1, 0, 4, 3): (5, 2, 1, 0, 4, 3),\n",
914 " (5, 2, 1, 3, 0, 4): (5, 2, 1, 3, 0, 4),\n",
915 " (5, 2, 1, 3, 4, 0): (5, 2, 1, 3, 4, 0),\n",
916 " (5, 2, 1, 4, 0, 3): (5, 2, 1, 4, 0, 3),\n",
917 " (5, 2, 1, 4, 3, 0): (5, 2, 1, 4, 3, 0),\n",
918 " (5, 2, 3, 0, 1, 4): (5, 2, 3, 0, 1, 4),\n",
919 " (5, 2, 3, 0, 4, 1): (5, 2, 3, 0, 4, 1),\n",
920 " (5, 2, 3, 1, 0, 4): (5, 2, 3, 1, 0, 4),\n",
921 " (5, 2, 3, 1, 4, 0): (5, 2, 3, 1, 4, 0),\n",
922 " (5, 2, 3, 4, 0, 1): (5, 2, 3, 4, 0, 1),\n",
923 " (5, 2, 3, 4, 1, 0): (5, 2, 3, 4, 1, 0),\n",
924 " (5, 2, 4, 0, 1, 3): (5, 2, 4, 0, 1, 3),\n",
925 " (5, 2, 4, 0, 3, 1): (5, 2, 4, 0, 3, 1),\n",
926 " (5, 2, 4, 1, 0, 3): (5, 2, 4, 1, 0, 3),\n",
927 " (5, 2, 4, 1, 3, 0): (5, 2, 4, 1, 3, 0),\n",
928 " (5, 2, 4, 3, 0, 1): (5, 2, 4, 3, 0, 1),\n",
929 " (5, 2, 4, 3, 1, 0): (5, 2, 4, 3, 1, 0),\n",
930 " (5, 3, 0, 1, 2, 4): (5, 3, 0, 1, 2, 4),\n",
931 " (5, 3, 0, 1, 4, 2): (5, 3, 0, 1, 4, 2),\n",
932 " (5, 3, 0, 2, 1, 4): (5, 3, 0, 2, 1, 4),\n",
933 " (5, 3, 0, 2, 4, 1): (5, 3, 0, 2, 4, 1),\n",
934 " (5, 3, 0, 4, 1, 2): (5, 3, 0, 4, 1, 2),\n",
935 " (5, 3, 0, 4, 2, 1): (5, 3, 0, 4, 2, 1),\n",
936 " (5, 3, 1, 0, 2, 4): (5, 3, 1, 0, 2, 4),\n",
937 " (5, 3, 1, 0, 4, 2): (5, 3, 1, 0, 4, 2),\n",
938 " (5, 3, 1, 2, 0, 4): (5, 3, 1, 2, 0, 4),\n",
939 " (5, 3, 1, 2, 4, 0): (5, 3, 1, 2, 4, 0),\n",
940 " (5, 3, 1, 4, 0, 2): (5, 3, 1, 4, 0, 2),\n",
941 " (5, 3, 1, 4, 2, 0): (5, 3, 1, 4, 2, 0),\n",
942 " (5, 3, 2, 0, 1, 4): (5, 3, 2, 0, 1, 4),\n",
943 " (5, 3, 2, 0, 4, 1): (5, 3, 2, 0, 4, 1),\n",
944 " (5, 3, 2, 1, 0, 4): (5, 3, 2, 1, 0, 4),\n",
945 " (5, 3, 2, 1, 4, 0): (5, 3, 2, 1, 4, 0),\n",
946 " (5, 3, 2, 4, 0, 1): (5, 3, 2, 4, 0, 1),\n",
947 " (5, 3, 2, 4, 1, 0): (5, 3, 2, 4, 1, 0),\n",
948 " (5, 3, 4, 0, 1, 2): (5, 3, 4, 0, 1, 2),\n",
949 " (5, 3, 4, 0, 2, 1): (5, 3, 4, 0, 2, 1),\n",
950 " (5, 3, 4, 1, 0, 2): (5, 3, 4, 1, 0, 2),\n",
951 " (5, 3, 4, 1, 2, 0): (5, 3, 4, 1, 2, 0),\n",
952 " (5, 3, 4, 2, 0, 1): (5, 3, 4, 2, 0, 1),\n",
953 " (5, 3, 4, 2, 1, 0): (5, 3, 4, 2, 1, 0),\n",
954 " (5, 4, 0, 1, 2, 3): (5, 4, 0, 1, 2, 3),\n",
955 " (5, 4, 0, 1, 3, 2): (5, 4, 0, 1, 3, 2),\n",
956 " (5, 4, 0, 2, 1, 3): (5, 4, 0, 2, 1, 3),\n",
957 " (5, 4, 0, 2, 3, 1): (5, 4, 0, 2, 3, 1),\n",
958 " (5, 4, 0, 3, 1, 2): (5, 4, 0, 3, 1, 2),\n",
959 " (5, 4, 0, 3, 2, 1): (5, 4, 0, 3, 2, 1),\n",
960 " (5, 4, 1, 0, 2, 3): (5, 4, 1, 0, 2, 3),\n",
961 " (5, 4, 1, 0, 3, 2): (5, 4, 1, 0, 3, 2),\n",
962 " (5, 4, 1, 2, 0, 3): (5, 4, 1, 2, 0, 3),\n",
963 " (5, 4, 1, 2, 3, 0): (5, 4, 1, 2, 3, 0),\n",
964 " (5, 4, 1, 3, 0, 2): (5, 4, 1, 3, 0, 2),\n",
965 " (5, 4, 1, 3, 2, 0): (5, 4, 1, 3, 2, 0),\n",
966 " (5, 4, 2, 0, 1, 3): (5, 4, 2, 0, 1, 3),\n",
967 " (5, 4, 2, 0, 3, 1): (5, 4, 2, 0, 3, 1),\n",
968 " (5, 4, 2, 1, 0, 3): (5, 4, 2, 1, 0, 3),\n",
969 " (5, 4, 2, 1, 3, 0): (5, 4, 2, 1, 3, 0),\n",
970 " (5, 4, 2, 3, 0, 1): (5, 4, 2, 3, 0, 1),\n",
971 " (5, 4, 2, 3, 1, 0): (5, 4, 2, 3, 1, 0),\n",
972 " (5, 4, 3, 0, 1, 2): (5, 4, 3, 0, 1, 2),\n",
973 " (5, 4, 3, 0, 2, 1): (5, 4, 3, 0, 2, 1),\n",
974 " (5, 4, 3, 1, 0, 2): (5, 4, 3, 1, 0, 2),\n",
975 " (5, 4, 3, 1, 2, 0): (5, 4, 3, 1, 2, 0),\n",
976 " (5, 4, 3, 2, 0, 1): (5, 4, 3, 2, 0, 1),\n",
977 " (5, 4, 3, 2, 1, 0): (5, 4, 3, 2, 1, 0)}"
978 ]
979 },
980 "execution_count": 16,
981 "metadata": {},
982 "output_type": "execute_result"
983 }
984 ],
985 "source": [
986 "transpositions6 = {t: t for t in set(itertools.permutations(list(range(6))))}\n",
987 "transpositions6"
988 ]
989 },
990 {
991 "cell_type": "code",
992 "execution_count": 17,
993 "metadata": {
994 "collapsed": false
995 },
996 "outputs": [
997 {
998 "data": {
999 "text/plain": [
1000 "(((2, 4, 3, 5, 0, 1), (1, 2), <AmscoFillStyle.reverse_each_row: 3>),\n",
1001 " -1437.9908206760847)"
1002 ]
1003 },
1004 "execution_count": 17,
1005 "metadata": {},
1006 "output_type": "execute_result"
1007 }
1008 ],
1009 "source": [
1010 "key_b, score = amsco_break(c7b, translist=transpositions6)\n",
1011 "key_b, score"
1012 ]
1013 },
1014 {
1015 "cell_type": "code",
1016 "execution_count": 18,
1017 "metadata": {
1018 "collapsed": false
1019 },
1020 "outputs": [
1021 {
1022 "data": {
1023 "text/plain": [
1024 "[[AmscoSlice(index=0, start=0, end=1),\n",
1025 " AmscoSlice(index=1, start=1, end=3),\n",
1026 " AmscoSlice(index=2, start=3, end=4),\n",
1027 " AmscoSlice(index=3, start=4, end=6),\n",
1028 " AmscoSlice(index=4, start=6, end=7),\n",
1029 " AmscoSlice(index=5, start=7, end=9)],\n",
1030 " [AmscoSlice(index=6, start=9, end=11),\n",
1031 " AmscoSlice(index=7, start=11, end=12),\n",
1032 " AmscoSlice(index=8, start=12, end=14),\n",
1033 " AmscoSlice(index=9, start=14, end=15),\n",
1034 " AmscoSlice(index=10, start=15, end=17),\n",
1035 " AmscoSlice(index=11, start=17, end=18)],\n",
1036 " [AmscoSlice(index=12, start=18, end=19),\n",
1037 " AmscoSlice(index=13, start=19, end=21),\n",
1038 " AmscoSlice(index=14, start=21, end=22),\n",
1039 " AmscoSlice(index=15, start=22, end=24),\n",
1040 " AmscoSlice(index=16, start=24, end=25),\n",
1041 " AmscoSlice(index=17, start=25, end=27)],\n",
1042 " [AmscoSlice(index=18, start=27, end=29),\n",
1043 " AmscoSlice(index=19, start=29, end=30),\n",
1044 " AmscoSlice(index=20, start=30, end=32),\n",
1045 " AmscoSlice(index=21, start=32, end=33),\n",
1046 " AmscoSlice(index=22, start=33, end=35),\n",
1047 " AmscoSlice(index=23, start=35, end=36)],\n",
1048 " [AmscoSlice(index=24, start=36, end=37),\n",
1049 " AmscoSlice(index=25, start=37, end=39),\n",
1050 " AmscoSlice(index=26, start=39, end=40),\n",
1051 " AmscoSlice(index=27, start=40, end=42),\n",
1052 " AmscoSlice(index=28, start=42, end=43),\n",
1053 " AmscoSlice(index=29, start=43, end=45)],\n",
1054 " [AmscoSlice(index=30, start=45, end=47),\n",
1055 " AmscoSlice(index=31, start=47, end=48),\n",
1056 " AmscoSlice(index=32, start=48, end=50),\n",
1057 " AmscoSlice(index=33, start=50, end=51),\n",
1058 " AmscoSlice(index=34, start=51, end=53),\n",
1059 " AmscoSlice(index=35, start=53, end=54)],\n",
1060 " [AmscoSlice(index=36, start=54, end=55),\n",
1061 " AmscoSlice(index=37, start=55, end=57),\n",
1062 " AmscoSlice(index=38, start=57, end=58),\n",
1063 " AmscoSlice(index=39, start=58, end=60),\n",
1064 " AmscoSlice(index=40, start=60, end=61),\n",
1065 " AmscoSlice(index=41, start=61, end=63)],\n",
1066 " [AmscoSlice(index=42, start=63, end=65),\n",
1067 " AmscoSlice(index=43, start=65, end=66),\n",
1068 " AmscoSlice(index=44, start=66, end=68),\n",
1069 " AmscoSlice(index=45, start=68, end=69),\n",
1070 " AmscoSlice(index=46, start=69, end=71),\n",
1071 " AmscoSlice(index=47, start=71, end=72)],\n",
1072 " [AmscoSlice(index=48, start=72, end=73),\n",
1073 " AmscoSlice(index=49, start=73, end=75),\n",
1074 " AmscoSlice(index=50, start=75, end=76),\n",
1075 " AmscoSlice(index=51, start=76, end=78),\n",
1076 " AmscoSlice(index=52, start=78, end=79),\n",
1077 " AmscoSlice(index=53, start=79, end=81)],\n",
1078 " [AmscoSlice(index=54, start=81, end=83),\n",
1079 " AmscoSlice(index=55, start=83, end=84),\n",
1080 " AmscoSlice(index=56, start=84, end=86),\n",
1081 " AmscoSlice(index=57, start=86, end=87),\n",
1082 " AmscoSlice(index=58, start=87, end=89),\n",
1083 " AmscoSlice(index=59, start=89, end=90)],\n",
1084 " [AmscoSlice(index=60, start=90, end=91),\n",
1085 " AmscoSlice(index=61, start=91, end=93),\n",
1086 " AmscoSlice(index=62, start=93, end=94),\n",
1087 " AmscoSlice(index=63, start=94, end=96),\n",
1088 " AmscoSlice(index=64, start=96, end=97),\n",
1089 " AmscoSlice(index=65, start=97, end=99)],\n",
1090 " [AmscoSlice(index=66, start=99, end=101),\n",
1091 " AmscoSlice(index=67, start=101, end=102),\n",
1092 " AmscoSlice(index=68, start=102, end=104),\n",
1093 " AmscoSlice(index=69, start=104, end=105),\n",
1094 " AmscoSlice(index=70, start=105, end=107),\n",
1095 " AmscoSlice(index=71, start=107, end=108)],\n",
1096 " [AmscoSlice(index=72, start=108, end=109),\n",
1097 " AmscoSlice(index=73, start=109, end=111),\n",
1098 " AmscoSlice(index=74, start=111, end=112),\n",
1099 " AmscoSlice(index=75, start=112, end=114),\n",
1100 " AmscoSlice(index=76, start=114, end=115),\n",
1101 " AmscoSlice(index=77, start=115, end=117)],\n",
1102 " [AmscoSlice(index=78, start=117, end=119),\n",
1103 " AmscoSlice(index=79, start=119, end=120),\n",
1104 " AmscoSlice(index=80, start=120, end=122),\n",
1105 " AmscoSlice(index=81, start=122, end=123),\n",
1106 " AmscoSlice(index=82, start=123, end=125),\n",
1107 " AmscoSlice(index=83, start=125, end=126)],\n",
1108 " [AmscoSlice(index=84, start=126, end=127),\n",
1109 " AmscoSlice(index=85, start=127, end=129),\n",
1110 " AmscoSlice(index=86, start=129, end=130),\n",
1111 " AmscoSlice(index=87, start=130, end=132),\n",
1112 " AmscoSlice(index=88, start=132, end=133),\n",
1113 " AmscoSlice(index=89, start=133, end=135)],\n",
1114 " [AmscoSlice(index=90, start=135, end=137),\n",
1115 " AmscoSlice(index=91, start=137, end=138),\n",
1116 " AmscoSlice(index=92, start=138, end=140),\n",
1117 " AmscoSlice(index=93, start=140, end=141),\n",
1118 " AmscoSlice(index=94, start=141, end=143),\n",
1119 " AmscoSlice(index=95, start=143, end=144)],\n",
1120 " [AmscoSlice(index=96, start=144, end=145),\n",
1121 " AmscoSlice(index=97, start=145, end=147),\n",
1122 " AmscoSlice(index=98, start=147, end=148),\n",
1123 " AmscoSlice(index=99, start=148, end=150),\n",
1124 " AmscoSlice(index=100, start=150, end=151),\n",
1125 " AmscoSlice(index=101, start=151, end=153)],\n",
1126 " [AmscoSlice(index=102, start=153, end=155),\n",
1127 " AmscoSlice(index=103, start=155, end=156),\n",
1128 " AmscoSlice(index=104, start=156, end=158),\n",
1129 " AmscoSlice(index=105, start=158, end=159),\n",
1130 " AmscoSlice(index=106, start=159, end=161),\n",
1131 " AmscoSlice(index=107, start=161, end=162)],\n",
1132 " [AmscoSlice(index=108, start=162, end=163),\n",
1133 " AmscoSlice(index=109, start=163, end=165),\n",
1134 " AmscoSlice(index=110, start=165, end=166),\n",
1135 " AmscoSlice(index=111, start=166, end=168),\n",
1136 " AmscoSlice(index=112, start=168, end=169),\n",
1137 " AmscoSlice(index=113, start=169, end=171)],\n",
1138 " [AmscoSlice(index=114, start=171, end=173),\n",
1139 " AmscoSlice(index=115, start=173, end=174),\n",
1140 " AmscoSlice(index=116, start=174, end=176),\n",
1141 " AmscoSlice(index=117, start=176, end=177),\n",
1142 " AmscoSlice(index=118, start=177, end=179),\n",
1143 " AmscoSlice(index=119, start=179, end=180)],\n",
1144 " [AmscoSlice(index=120, start=180, end=181),\n",
1145 " AmscoSlice(index=121, start=181, end=183),\n",
1146 " AmscoSlice(index=122, start=183, end=184),\n",
1147 " AmscoSlice(index=123, start=184, end=186),\n",
1148 " AmscoSlice(index=124, start=186, end=187),\n",
1149 " AmscoSlice(index=125, start=187, end=189)],\n",
1150 " [AmscoSlice(index=126, start=189, end=191),\n",
1151 " AmscoSlice(index=127, start=191, end=192),\n",
1152 " AmscoSlice(index=128, start=192, end=194),\n",
1153 " AmscoSlice(index=129, start=194, end=195),\n",
1154 " AmscoSlice(index=130, start=195, end=197),\n",
1155 " AmscoSlice(index=131, start=197, end=198)],\n",
1156 " [AmscoSlice(index=132, start=198, end=199),\n",
1157 " AmscoSlice(index=133, start=199, end=201),\n",
1158 " AmscoSlice(index=134, start=201, end=202),\n",
1159 " AmscoSlice(index=135, start=202, end=204),\n",
1160 " AmscoSlice(index=136, start=204, end=205),\n",
1161 " AmscoSlice(index=137, start=205, end=207)],\n",
1162 " [AmscoSlice(index=138, start=207, end=209),\n",
1163 " AmscoSlice(index=139, start=209, end=210),\n",
1164 " AmscoSlice(index=140, start=210, end=212),\n",
1165 " AmscoSlice(index=141, start=212, end=213),\n",
1166 " AmscoSlice(index=142, start=213, end=215),\n",
1167 " AmscoSlice(index=143, start=215, end=216)],\n",
1168 " [AmscoSlice(index=144, start=216, end=217),\n",
1169 " AmscoSlice(index=145, start=217, end=219),\n",
1170 " AmscoSlice(index=146, start=219, end=220),\n",
1171 " AmscoSlice(index=147, start=220, end=222),\n",
1172 " AmscoSlice(index=148, start=222, end=223),\n",
1173 " AmscoSlice(index=149, start=223, end=225)],\n",
1174 " [AmscoSlice(index=150, start=225, end=227),\n",
1175 " AmscoSlice(index=151, start=227, end=228),\n",
1176 " AmscoSlice(index=152, start=228, end=230),\n",
1177 " AmscoSlice(index=153, start=230, end=231),\n",
1178 " AmscoSlice(index=154, start=231, end=233),\n",
1179 " AmscoSlice(index=155, start=233, end=234)],\n",
1180 " [AmscoSlice(index=156, start=234, end=235),\n",
1181 " AmscoSlice(index=157, start=235, end=237),\n",
1182 " AmscoSlice(index=158, start=237, end=238),\n",
1183 " AmscoSlice(index=159, start=238, end=240),\n",
1184 " AmscoSlice(index=160, start=240, end=241),\n",
1185 " AmscoSlice(index=161, start=241, end=243)],\n",
1186 " [AmscoSlice(index=162, start=243, end=245),\n",
1187 " AmscoSlice(index=163, start=245, end=246),\n",
1188 " AmscoSlice(index=164, start=246, end=248),\n",
1189 " AmscoSlice(index=165, start=248, end=249),\n",
1190 " AmscoSlice(index=166, start=249, end=251),\n",
1191 " AmscoSlice(index=167, start=251, end=252)],\n",
1192 " [AmscoSlice(index=168, start=252, end=253),\n",
1193 " AmscoSlice(index=169, start=253, end=255),\n",
1194 " AmscoSlice(index=170, start=255, end=256),\n",
1195 " AmscoSlice(index=171, start=256, end=258),\n",
1196 " AmscoSlice(index=172, start=258, end=259),\n",
1197 " AmscoSlice(index=173, start=259, end=261)],\n",
1198 " [AmscoSlice(index=174, start=261, end=263),\n",
1199 " AmscoSlice(index=175, start=263, end=264),\n",
1200 " AmscoSlice(index=176, start=264, end=266),\n",
1201 " AmscoSlice(index=177, start=266, end=267),\n",
1202 " AmscoSlice(index=178, start=267, end=269),\n",
1203 " AmscoSlice(index=179, start=269, end=270)],\n",
1204 " [AmscoSlice(index=180, start=270, end=271),\n",
1205 " AmscoSlice(index=181, start=271, end=273),\n",
1206 " AmscoSlice(index=182, start=273, end=274),\n",
1207 " AmscoSlice(index=183, start=274, end=276),\n",
1208 " AmscoSlice(index=184, start=276, end=277),\n",
1209 " AmscoSlice(index=185, start=277, end=279)],\n",
1210 " [AmscoSlice(index=186, start=279, end=281),\n",
1211 " AmscoSlice(index=187, start=281, end=282),\n",
1212 " AmscoSlice(index=188, start=282, end=284),\n",
1213 " AmscoSlice(index=189, start=284, end=285),\n",
1214 " AmscoSlice(index=190, start=285, end=287),\n",
1215 " AmscoSlice(index=191, start=287, end=288)],\n",
1216 " [AmscoSlice(index=192, start=288, end=289),\n",
1217 " AmscoSlice(index=193, start=289, end=291),\n",
1218 " AmscoSlice(index=194, start=291, end=292),\n",
1219 " AmscoSlice(index=195, start=292, end=294),\n",
1220 " AmscoSlice(index=196, start=294, end=295),\n",
1221 " AmscoSlice(index=197, start=295, end=297)],\n",
1222 " [AmscoSlice(index=198, start=297, end=299),\n",
1223 " AmscoSlice(index=199, start=299, end=300),\n",
1224 " AmscoSlice(index=200, start=300, end=302),\n",
1225 " AmscoSlice(index=201, start=302, end=303),\n",
1226 " AmscoSlice(index=202, start=303, end=305),\n",
1227 " AmscoSlice(index=203, start=305, end=306)],\n",
1228 " [AmscoSlice(index=204, start=306, end=307),\n",
1229 " AmscoSlice(index=205, start=307, end=309),\n",
1230 " AmscoSlice(index=206, start=309, end=310),\n",
1231 " AmscoSlice(index=207, start=310, end=312),\n",
1232 " AmscoSlice(index=208, start=312, end=313),\n",
1233 " AmscoSlice(index=209, start=313, end=315)],\n",
1234 " [AmscoSlice(index=210, start=315, end=317),\n",
1235 " AmscoSlice(index=211, start=317, end=318),\n",
1236 " AmscoSlice(index=212, start=318, end=320),\n",
1237 " AmscoSlice(index=213, start=320, end=321),\n",
1238 " AmscoSlice(index=214, start=321, end=323),\n",
1239 " AmscoSlice(index=215, start=323, end=324)],\n",
1240 " [AmscoSlice(index=216, start=324, end=325),\n",
1241 " AmscoSlice(index=217, start=325, end=327),\n",
1242 " AmscoSlice(index=218, start=327, end=328),\n",
1243 " AmscoSlice(index=219, start=328, end=330),\n",
1244 " AmscoSlice(index=220, start=330, end=331),\n",
1245 " AmscoSlice(index=221, start=331, end=333)],\n",
1246 " [AmscoSlice(index=222, start=333, end=335),\n",
1247 " AmscoSlice(index=223, start=335, end=336),\n",
1248 " AmscoSlice(index=224, start=336, end=338),\n",
1249 " AmscoSlice(index=225, start=338, end=339),\n",
1250 " AmscoSlice(index=226, start=339, end=341),\n",
1251 " AmscoSlice(index=227, start=341, end=342)],\n",
1252 " [AmscoSlice(index=228, start=342, end=343),\n",
1253 " AmscoSlice(index=229, start=343, end=345),\n",
1254 " AmscoSlice(index=230, start=345, end=346),\n",
1255 " AmscoSlice(index=231, start=346, end=348),\n",
1256 " AmscoSlice(index=232, start=348, end=349),\n",
1257 " AmscoSlice(index=233, start=349, end=351)],\n",
1258 " [AmscoSlice(index=234, start=351, end=353),\n",
1259 " AmscoSlice(index=235, start=353, end=354),\n",
1260 " AmscoSlice(index=236, start=354, end=356),\n",
1261 " AmscoSlice(index=237, start=356, end=357),\n",
1262 " AmscoSlice(index=238, start=357, end=359),\n",
1263 " AmscoSlice(index=239, start=359, end=360)],\n",
1264 " [AmscoSlice(index=240, start=360, end=361),\n",
1265 " AmscoSlice(index=241, start=361, end=363),\n",
1266 " AmscoSlice(index=242, start=363, end=364),\n",
1267 " AmscoSlice(index=243, start=364, end=366),\n",
1268 " AmscoSlice(index=244, start=366, end=367),\n",
1269 " AmscoSlice(index=245, start=367, end=369)],\n",
1270 " [AmscoSlice(index=246, start=369, end=371),\n",
1271 " AmscoSlice(index=247, start=371, end=372),\n",
1272 " AmscoSlice(index=248, start=372, end=374),\n",
1273 " AmscoSlice(index=249, start=374, end=375),\n",
1274 " AmscoSlice(index=250, start=375, end=377),\n",
1275 " AmscoSlice(index=251, start=377, end=378)],\n",
1276 " [AmscoSlice(index=252, start=378, end=379),\n",
1277 " AmscoSlice(index=253, start=379, end=381),\n",
1278 " AmscoSlice(index=254, start=381, end=382),\n",
1279 " AmscoSlice(index=255, start=382, end=384),\n",
1280 " AmscoSlice(index=256, start=384, end=385),\n",
1281 " AmscoSlice(index=257, start=385, end=387)],\n",
1282 " [AmscoSlice(index=258, start=387, end=389),\n",
1283 " AmscoSlice(index=259, start=389, end=390),\n",
1284 " AmscoSlice(index=260, start=390, end=392),\n",
1285 " AmscoSlice(index=261, start=392, end=393),\n",
1286 " AmscoSlice(index=262, start=393, end=395),\n",
1287 " AmscoSlice(index=263, start=395, end=396)],\n",
1288 " [AmscoSlice(index=264, start=396, end=397),\n",
1289 " AmscoSlice(index=265, start=397, end=399),\n",
1290 " AmscoSlice(index=266, start=399, end=400),\n",
1291 " AmscoSlice(index=267, start=400, end=402),\n",
1292 " AmscoSlice(index=268, start=402, end=403),\n",
1293 " AmscoSlice(index=269, start=403, end=405)],\n",
1294 " [AmscoSlice(index=270, start=405, end=407),\n",
1295 " AmscoSlice(index=271, start=407, end=408),\n",
1296 " AmscoSlice(index=272, start=408, end=410),\n",
1297 " AmscoSlice(index=273, start=410, end=411),\n",
1298 " AmscoSlice(index=274, start=411, end=413),\n",
1299 " AmscoSlice(index=275, start=413, end=414)],\n",
1300 " [AmscoSlice(index=276, start=414, end=415),\n",
1301 " AmscoSlice(index=277, start=415, end=417),\n",
1302 " AmscoSlice(index=278, start=417, end=418),\n",
1303 " AmscoSlice(index=279, start=418, end=420),\n",
1304 " AmscoSlice(index=280, start=420, end=421),\n",
1305 " AmscoSlice(index=281, start=421, end=423)],\n",
1306 " [AmscoSlice(index=282, start=423, end=425),\n",
1307 " AmscoSlice(index=283, start=425, end=426),\n",
1308 " AmscoSlice(index=284, start=426, end=428),\n",
1309 " AmscoSlice(index=285, start=428, end=429),\n",
1310 " AmscoSlice(index=286, start=429, end=431),\n",
1311 " AmscoSlice(index=287, start=431, end=432)],\n",
1312 " [AmscoSlice(index=288, start=432, end=433),\n",
1313 " AmscoSlice(index=289, start=433, end=435),\n",
1314 " AmscoSlice(index=290, start=435, end=436),\n",
1315 " AmscoSlice(index=291, start=436, end=438),\n",
1316 " AmscoSlice(index=292, start=438, end=439),\n",
1317 " AmscoSlice(index=293, start=439, end=441)],\n",
1318 " [AmscoSlice(index=294, start=441, end=443),\n",
1319 " AmscoSlice(index=295, start=443, end=444),\n",
1320 " AmscoSlice(index=296, start=444, end=446),\n",
1321 " AmscoSlice(index=297, start=446, end=447),\n",
1322 " AmscoSlice(index=298, start=447, end=449),\n",
1323 " AmscoSlice(index=299, start=449, end=450)],\n",
1324 " [AmscoSlice(index=300, start=450, end=451),\n",
1325 " AmscoSlice(index=301, start=451, end=453),\n",
1326 " AmscoSlice(index=302, start=453, end=454),\n",
1327 " AmscoSlice(index=303, start=454, end=456),\n",
1328 " AmscoSlice(index=304, start=456, end=457),\n",
1329 " AmscoSlice(index=305, start=457, end=459)],\n",
1330 " [AmscoSlice(index=306, start=459, end=461),\n",
1331 " AmscoSlice(index=307, start=461, end=462),\n",
1332 " AmscoSlice(index=308, start=462, end=464),\n",
1333 " AmscoSlice(index=309, start=464, end=465),\n",
1334 " AmscoSlice(index=310, start=465, end=467),\n",
1335 " AmscoSlice(index=311, start=467, end=468)],\n",
1336 " [AmscoSlice(index=312, start=468, end=469),\n",
1337 " AmscoSlice(index=313, start=469, end=471),\n",
1338 " AmscoSlice(index=314, start=471, end=472),\n",
1339 " AmscoSlice(index=315, start=472, end=474),\n",
1340 " AmscoSlice(index=316, start=474, end=475),\n",
1341 " AmscoSlice(index=317, start=475, end=477)],\n",
1342 " [AmscoSlice(index=318, start=477, end=479),\n",
1343 " AmscoSlice(index=319, start=479, end=480),\n",
1344 " AmscoSlice(index=320, start=480, end=482),\n",
1345 " AmscoSlice(index=321, start=482, end=483),\n",
1346 " AmscoSlice(index=322, start=483, end=485),\n",
1347 " AmscoSlice(index=323, start=485, end=486)],\n",
1348 " [AmscoSlice(index=324, start=486, end=487),\n",
1349 " AmscoSlice(index=325, start=487, end=489),\n",
1350 " AmscoSlice(index=326, start=489, end=490),\n",
1351 " AmscoSlice(index=327, start=490, end=492),\n",
1352 " AmscoSlice(index=328, start=492, end=493),\n",
1353 " AmscoSlice(index=329, start=493, end=495)],\n",
1354 " [AmscoSlice(index=330, start=495, end=497),\n",
1355 " AmscoSlice(index=331, start=497, end=498),\n",
1356 " AmscoSlice(index=332, start=498, end=500),\n",
1357 " AmscoSlice(index=333, start=500, end=501),\n",
1358 " AmscoSlice(index=334, start=501, end=503),\n",
1359 " AmscoSlice(index=335, start=503, end=504)],\n",
1360 " [AmscoSlice(index=336, start=504, end=505),\n",
1361 " AmscoSlice(index=337, start=505, end=507),\n",
1362 " AmscoSlice(index=338, start=507, end=508),\n",
1363 " AmscoSlice(index=339, start=508, end=510),\n",
1364 " AmscoSlice(index=340, start=510, end=511),\n",
1365 " AmscoSlice(index=341, start=511, end=513)],\n",
1366 " [AmscoSlice(index=342, start=513, end=515),\n",
1367 " AmscoSlice(index=343, start=515, end=516),\n",
1368 " AmscoSlice(index=344, start=516, end=518),\n",
1369 " AmscoSlice(index=345, start=518, end=519),\n",
1370 " AmscoSlice(index=346, start=519, end=521),\n",
1371 " AmscoSlice(index=347, start=521, end=522)],\n",
1372 " [AmscoSlice(index=348, start=522, end=523),\n",
1373 " AmscoSlice(index=349, start=523, end=525),\n",
1374 " AmscoSlice(index=350, start=525, end=526),\n",
1375 " AmscoSlice(index=351, start=526, end=528),\n",
1376 " AmscoSlice(index=352, start=528, end=529),\n",
1377 " AmscoSlice(index=353, start=529, end=531)],\n",
1378 " [AmscoSlice(index=354, start=531, end=533),\n",
1379 " AmscoSlice(index=355, start=533, end=534),\n",
1380 " AmscoSlice(index=356, start=534, end=536),\n",
1381 " AmscoSlice(index=357, start=536, end=537),\n",
1382 " AmscoSlice(index=358, start=537, end=539),\n",
1383 " AmscoSlice(index=359, start=539, end=540)],\n",
1384 " [AmscoSlice(index=360, start=540, end=541),\n",
1385 " AmscoSlice(index=361, start=541, end=543),\n",
1386 " AmscoSlice(index=362, start=543, end=544),\n",
1387 " AmscoSlice(index=363, start=544, end=546),\n",
1388 " AmscoSlice(index=364, start=546, end=547),\n",
1389 " AmscoSlice(index=365, start=547, end=549)],\n",
1390 " [AmscoSlice(index=366, start=549, end=551),\n",
1391 " AmscoSlice(index=367, start=551, end=552),\n",
1392 " AmscoSlice(index=368, start=552, end=554),\n",
1393 " AmscoSlice(index=369, start=554, end=555),\n",
1394 " AmscoSlice(index=370, start=555, end=557),\n",
1395 " AmscoSlice(index=371, start=557, end=558)],\n",
1396 " [AmscoSlice(index=372, start=558, end=559),\n",
1397 " AmscoSlice(index=373, start=559, end=561),\n",
1398 " AmscoSlice(index=374, start=561, end=562),\n",
1399 " AmscoSlice(index=375, start=562, end=564),\n",
1400 " AmscoSlice(index=376, start=564, end=565),\n",
1401 " AmscoSlice(index=377, start=565, end=567)],\n",
1402 " [AmscoSlice(index=378, start=567, end=569),\n",
1403 " AmscoSlice(index=379, start=569, end=570),\n",
1404 " AmscoSlice(index=380, start=570, end=572),\n",
1405 " AmscoSlice(index=381, start=572, end=573),\n",
1406 " AmscoSlice(index=382, start=573, end=575),\n",
1407 " AmscoSlice(index=383, start=575, end=576)],\n",
1408 " [AmscoSlice(index=384, start=576, end=577),\n",
1409 " AmscoSlice(index=385, start=577, end=579),\n",
1410 " AmscoSlice(index=386, start=579, end=580),\n",
1411 " AmscoSlice(index=387, start=580, end=582),\n",
1412 " AmscoSlice(index=388, start=582, end=583),\n",
1413 " AmscoSlice(index=389, start=583, end=585)],\n",
1414 " [AmscoSlice(index=390, start=585, end=587),\n",
1415 " AmscoSlice(index=391, start=587, end=588),\n",
1416 " AmscoSlice(index=392, start=588, end=590),\n",
1417 " AmscoSlice(index=393, start=590, end=591),\n",
1418 " AmscoSlice(index=394, start=591, end=593),\n",
1419 " AmscoSlice(index=395, start=593, end=594)],\n",
1420 " [AmscoSlice(index=396, start=594, end=595),\n",
1421 " AmscoSlice(index=397, start=595, end=597),\n",
1422 " AmscoSlice(index=398, start=597, end=598),\n",
1423 " AmscoSlice(index=399, start=598, end=600),\n",
1424 " AmscoSlice(index=400, start=600, end=601),\n",
1425 " AmscoSlice(index=401, start=601, end=603)],\n",
1426 " [AmscoSlice(index=402, start=603, end=605),\n",
1427 " AmscoSlice(index=403, start=605, end=606),\n",
1428 " AmscoSlice(index=404, start=606, end=608),\n",
1429 " AmscoSlice(index=405, start=608, end=609),\n",
1430 " AmscoSlice(index=406, start=609, end=611),\n",
1431 " AmscoSlice(index=407, start=611, end=612)]]"
1432 ]
1433 },
1434 "execution_count": 18,
1435 "metadata": {},
1436 "output_type": "execute_result"
1437 }
1438 ],
1439 "source": [
1440 "amsco_transposition_positions(c7b, 'abcdef', \n",
1441 " fillpattern=(1, 2),\n",
1442 " fillstyle=AmscoFillStyle.reverse_each_row)"
1443 ]
1444 },
1445 {
1446 "cell_type": "code",
1447 "execution_count": 19,
1448 "metadata": {
1449 "collapsed": false,
1450 "scrolled": true
1451 },
1452 "outputs": [
1453 {
1454 "data": {
1455 "text/plain": [
1456 "['stager',\n",
1457 " 'staler',\n",
1458 " 'stalin',\n",
1459 " 'stamen',\n",
1460 " 'sucker',\n",
1461 " 'tucker',\n",
1462 " 'twangs',\n",
1463 " 'twerps',\n",
1464 " 'twirls',\n",
1465 " 'staffer',\n",
1466 " 'stagers',\n",
1467 " 'stagger',\n",
1468 " 'stalins',\n",
1469 " 'stamens',\n",
1470 " 'stamina',\n",
1471 " 'stammer',\n",
1472 " 'statler',\n",
1473 " 'suckers',\n",
1474 " 'sudsier',\n",
1475 " 'swagger',\n",
1476 " 'tubbier',\n",
1477 " 'tycoons',\n",
1478 " 'loadable',\n",
1479 " 'noblemen',\n",
1480 " 'rubidium',\n",
1481 " 'staffers',\n",
1482 " 'staggers',\n",
1483 " 'staminas',\n",
1484 " 'stammers',\n",
1485 " 'standard',\n",
1486 " 'steelier',\n",
1487 " 'submerse',\n",
1488 " 'swaggers',\n",
1489 " 'tubbiest',\n",
1490 " 'tuitions',\n",
1491 " 'twenties',\n",
1492 " 'stalemate',\n",
1493 " 'staleness',\n",
1494 " 'stalinist',\n",
1495 " 'stammerer',\n",
1496 " 'standards',\n",
1497 " 'submerses',\n",
1498 " 'swaggerer',\n",
1499 " 'stalemates',\n",
1500 " 'stalenesss',\n",
1501 " 'stammerers',\n",
1502 " 'stepsister',\n",
1503 " 'succulence',\n",
1504 " 'statistical',\n",
1505 " 'stepsisters',\n",
1506 " 'succulences',\n",
1507 " 'statistician',\n",
1508 " 'statisticians']"
1509 ]
1510 },
1511 "execution_count": 19,
1512 "metadata": {},
1513 "output_type": "execute_result"
1514 }
1515 ],
1516 "source": [
1517 "transpositions[key_b[0]]"
1518 ]
1519 },
1520 {
1521 "cell_type": "code",
1522 "execution_count": 20,
1523 "metadata": {
1524 "collapsed": false
1525 },
1526 "outputs": [
1527 {
1528 "name": "stdout",
1529 "output_type": "stream",
1530 "text": [
1531 "security protocol solitaire comrades under a decree from moscow we are confined to using a new high security stream cipher stolen from the americans the solitaire cipher all files classified top secret and above are to be archived using this method this new field cipher has been tested and proven to match the security of the fi alka machine without the overhead of the technology you will need only a deck of cards to implement the cipher the key to be used will be provided and distributed on a one time pad and you must destroy the key as you use it the key consists of a random shuffle of a full deck of cards together with two distinguishable jokers agents should be freely able to carry this equipment without arousing suspicion\n"
1532 ]
1533 }
1534 ],
1535 "source": [
1536 "print(' '.join(segment(sanitise(\n",
1537 " amsco_transposition_decipher(sanitise(c7b), \n",
1538 " keyword=transpositions[key_b[0]][0], \n",
1539 " fillpattern=key_b[1],\n",
1540 " fillstyle=key_b[2])\n",
1541 " ))))"
1542 ]
1543 },
1544 {
1545 "cell_type": "code",
1546 "execution_count": null,
1547 "metadata": {
1548 "collapsed": true
1549 },
1550 "outputs": [],
1551 "source": []
1552 }
1553 ],
1554 "metadata": {
1555 "kernelspec": {
1556 "display_name": "Python 3",
1557 "language": "python",
1558 "name": "python3"
1559 },
1560 "language_info": {
1561 "codemirror_mode": {
1562 "name": "ipython",
1563 "version": 3
1564 },
1565 "file_extension": ".py",
1566 "mimetype": "text/x-python",
1567 "name": "python",
1568 "nbconvert_exporter": "python",
1569 "pygments_lexer": "ipython3",
1570 "version": "3.4.3"
1571 }
1572 },
1573 "nbformat": 4,
1574 "nbformat_minor": 0
1575 }