-
Notifications
You must be signed in to change notification settings - Fork 0
/
19.rb
662 lines (648 loc) · 20.8 KB
/
19.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
data = DATA.read.split "\n\n"
MESSAGES = data.last.lines.map &:strip
RULES = data.first.lines.map do |rule|
symbol, expr = rule.split ?:
expr = expr.strip.split.map do |term|
if /\d+/ =~ term
term.to_i
elsif term == ?|
term
else
term[1..-2]
end
end
[symbol.to_i, expr]
end.to_h
def build_re symbol
RULES[symbol].map do |term|
if term.is_a? Integer
?( + build_re(term) + ?)
else
term
end
end.join
end
puts MESSAGES.grep(/^#{build_re 0}$/).count # 210
FINITE = (RULES.keys - [0, 8, 11])
.map { |symbol| [symbol, build_re(symbol)] }
.to_h
r42 = FINITE[42]
r11 = ("1".."10").map do |i| '((' + FINITE[42] + '){' + i + '}(' + FINITE[31] + '){' + i + '})' end.join('|')
puts MESSAGES.grep(/^(#{r42})+(#{r11})$/).count # 422
__END__
101: 118 64
83: 132 118 | 108 2
61: 19 2
33: 126 2 | 68 118
80: 2 48 | 118 91
47: 38 2 | 64 118
40: 25 2 | 93 118
18: 38 2 | 108 118
2: "a"
74: 118 108 | 2 12
41: 118 17 | 2 58
56: 125 2 | 132 118
66: 12 2 | 27 118
62: 118 52 | 2 125
58: 2 128 | 118 99
89: 110 2 | 3 118
30: 118 85 | 2 21
20: 2 70 | 118 111
85: 118 115 | 2 52
98: 118 46 | 2 10
12: 118 2 | 43 118
99: 102 118 | 56 2
127: 2 119 | 118 100
53: 125 2 | 108 118
15: 2 27 | 118 108
22: 95 2 | 61 118
109: 115 2 | 46 118
90: 76 2 | 121 118
37: 15 118 | 23 2
27: 118 2 | 118 118
104: 2 46 | 118 12
32: 64 2
26: 35 118 | 32 2
123: 131 2 | 89 118
21: 118 132 | 2 115
95: 112 118 | 125 2
79: 88 2 | 60 118
34: 107 2 | 133 118
6: 2 101 | 118 110
55: 118 112 | 2 64
10: 2 118
115: 2 118 | 2 2
39: 2 61 | 118 81
42: 92 118 | 124 2
105: 38 2 | 10 118
7: 10 2 | 27 118
106: 87 2 | 1 118
75: 118 46
28: 2 71 | 118 16
120: 118 27 | 2 112
100: 69 2 | 109 118
102: 46 118 | 132 2
5: 39 118 | 51 2
14: 57 2 | 96 118
8: 42
25: 118 59 | 2 67
3: 19 118 | 52 2
59: 2 74 | 118 83
87: 118 72 | 2 78
130: 111 2 | 117 118
112: 2 43 | 118 118
116: 118 38 | 2 108
17: 2 122 | 118 29
124: 41 118 | 40 2
11: 42 31
38: 43 43
44: 118 123 | 2 114
23: 12 2
29: 2 113 | 118 129
121: 2 10 | 118 19
93: 2 26 | 118 36
13: 19 118 | 46 2
107: 118 132 | 2 10
54: 118 27 | 2 12
63: 2 105 | 118 82
84: 2 37 | 118 73
52: 118 2 | 2 118
50: 118 111 | 2 9
111: 118 112 | 2 27
82: 118 46 | 2 108
118: "b"
133: 115 2
103: 34 2 | 22 118
36: 66 2 | 65 118
31: 33 118 | 79 2
69: 12 2 | 115 118
122: 54 118 | 66 2
114: 6 118 | 80 2
92: 118 14 | 2 44
0: 8 11
117: 132 2 | 108 118
76: 64 2 | 27 118
126: 2 28 | 118 127
113: 125 2 | 19 118
43: 118 | 2
46: 118 118 | 2 118
132: 118 118 | 2 2
49: 118 130 | 2 50
129: 19 118 | 27 2
24: 2 27 | 118 52
119: 118 47 | 2 98
91: 19 118 | 10 2
35: 115 118 | 46 2
57: 2 63 | 118 90
125: 118 118 | 43 2
108: 118 118
4: 115 118 | 19 2
94: 112 2 | 115 118
1: 2 55 | 118 75
9: 38 118 | 112 2
71: 2 18 | 118 53
60: 103 2 | 86 118
51: 116 2 | 24 118
128: 24 118 | 117 2
45: 118 2
16: 104 2 | 62 118
70: 118 115 | 2 45
77: 118 13 | 2 94
131: 61 2 | 107 118
68: 2 49 | 118 84
86: 118 97 | 2 30
78: 118 38 | 2 12
88: 5 2 | 106 118
81: 2 45 | 118 52
64: 2 2
19: 2 43 | 118 2
110: 132 2 | 64 118
96: 2 77 | 118 20
67: 104 118 | 4 2
65: 115 118 | 38 2
73: 118 110 | 2 120
72: 64 2 | 115 118
48: 2 46 | 118 10
97: 7 118 | 133 2
aaaaaababababbbbbababaab
aaababbabbbbbbabaaaabbaaabababaabababaaa
abaabababaababbaaaabbaaabaabbbaa
aabbaaaaabbbaabbaabbbabbbabaabbbaaabaabababaaabb
bababbbbbaaaaaababbbabbb
bababbaabbaaaaabbaabbabbbabbabbbbbbbbbababbbabab
aaabaababbaabbbbaaabaaabaabababb
babaaababbbaabaaaabababa
aaababbabbbbbaabaababbaabbababbbabaabbbbabababaaaaabbaab
baabbbbabaabaababbbbbabaabaabaabbaaaabab
bbbbaaabbabbbbabaaaabbabbbbbabaaaaaabbaa
bbababbbaabbaabaababbbab
bbaabbbabbbaababbbabbabb
abbaabbaaabbbaaaaabaabababbaabbababaabbbaaaabbaa
bbaababbbbbbbaabbbabaaab
baabbbaabbababbbababaaabaabbaabb
baaabbbababbbabbabbaabaa
bbaaabaabbbababbbbbbbabb
aabaabbbabaaaaabbbbaaaaa
babbbaaababbbbaaaabaaabbbabaabba
abbabbbbaabbaaaaabbbbbaabbbbbabbbaabaabb
aabbbbaaaabaaabbaabaaababbbbbabbbbaababa
abaaaabaabbaaabaabaaaabbabaaabaaaaabaaab
babaabbbbaaabaabbbababbbaabbababaaaaabababbbbaababbbbbbb
ababaaababaaaabbbababaab
bbbbabaabbbabbabbabbabbaaaabbaab
abababbbaaabababbbbbabbbaabbbabbbabaabaababbbbabaababbbb
bbaaaababaabbaabaabbababaabbbbba
abbaabaaabaaabaabababbbbbbaabaaaabbbabababbababbbabaabaabbabaaaa
bbbbaabaaaabaabbabababab
abbabbaabbbbbababbaabbbb
bbbbaabbababbbbbbbbbaabaaabbabaaaabaaaba
bbbbbaaaabbaabbbaaabbaaaabaabbaabbbbbabb
bbaaabaabbbbbbbbabbbbbaa
baabbbbaaababbababbaaabb
aaaababbbbaababaabbbbbbbaababbbb
aaaaabababaaaababbbaaaaa
abbbaabbbababbaaabaaabaa
bbbbbababbbbaabbaabaaaba
aabbbabbbbbababbaaaabbba
aabaaaaabbaaaabababaabab
bbbbbaaabbbabbabaabaaaab
bbbabbbaaabbbabbaabaaabbbbabbababbabaabbbbababab
abaababbabaabbaaaabbbbbababbbbaaababaaaabbbbabba
abaababbbbbababbabaaaabbababababaaabaaab
baaabbabaabbbabbaaaabbabbabababbbbbabaabaababbbbbababbba
bababbabbbbbbbaaaabbbabaabaaababbbbaaaaa
baabaaabaaabaaaabbaaaabb
bbbabbbbbabbbbbaababbaab
bbaaaabaaabaababbaaaaabbbbaaaabb
abbabbaabaaaaaabbaababaa
aaaaaaaaabaaaaabaaaabbabaabababa
bbbbaabaabbabbaabaabaabb
bbbbabbababaabbbabaaabbb
aaabaabbaabbaaaabbbaaaaa
abbabaaababababbbbbbaabaabbbaabbaaabaaaaaabbabaaabaabaaa
baaaabbbbabaaabaabaababbabaaaaaaabbabaaabbabbaab
abbbaabababbbaaababbbbaaabaabbbbbaaaaaababbabaaaabbbbbaabbbabababbabbaaa
aaaaaaaaaabbbaaabbabbaab
bbabbbaabbabbbbabbaababaaaabbabaaaabaaba
abbaaaaabbaaaaabbbaababbaabbbababababbbabbabbbbabbbaaaabaabaabab
bbbabaabaaabbaaabaabaaabbaabbbbb
aaabbaaabbabababababbaabbabaaaaabbbaabbbbabaabab
abaabbbbabbbbaaabaaaabab
abbaababbbbababbababaaaa
bbbbbaabbbabbabaababaaaa
bbbaabbaabbbbbabaabbbabbabbbaababaababbbaaaaabbbbaaaaaba
aabbbabbbaabbaaaaabbaabb
aaabbaaaabaaaabaabbbabab
bbbbaababbbbbaabaaaaababbabbbaababbabaab
baabbbbabaabbaabbabaabaaabaabbabaaabaaaaababbbabaababaaa
bbbbaaaabbbabbbbabbbbbaa
abaababbbbbbababbababababaabaaababbbbbaa
aaabaaaabbaabaaaabbbabaa
bbbabbabaabbababbaabbbaababbaaaaabbabaab
aabaaabbabbbbabaabaabaaa
bbbbaabbabababbbaaaaaababababaaabbbababa
bbbabbbabbabaabbaaabbbbb
abaaabbabaaababbaaabbbab
bbbbabaabaaabbbbaaaabbabbbaaabaababbbaab
abbaaaabaababbabaabaababbbabbaab
aabbabbaaaabbbbababaaaab
abbbabbaabbbbababbbbbaabbababbabaaabaaabababbbab
bbabaabaabaaaabababbbbbb
bbbbbbbbaaababbaabbbaaab
bbaabbababbbbaaabbaaaabb
babbabbbbaabbabbababaaba
baaabaabaaabbbbaababbbbaaaabbbaaaaabbbaabbbababaaabbbaab
aaaaabababbabaaabaaabbbaabababababaabbba
baaaabbbaaabbaaabaababbabababbababbabbaabaababbaaaabbabaaababaaa
babbbaaaabbaabbbbabbbbbb
bbbbbaaabbaabbbabaaaabba
abbbabaabbbbabbaabaabaaabaaaabbabbbaaaabbbaabbabababbaabbaaaabaa
babbababaababbababbababa
abaabbbbabbaabababbaaaaa
bbbabbaaaaabababbbaabbaabbababaabbbabaaa
abaaaabaababbbbbaabaaaaabbbabbbabbababab
aababbababbaabbbbbbbbabb
bbababbbaabaaaaabbababbabababbabbbabbaaa
abbbbabbbababbbaaaaabbabbbabbbabaaabbbaabbbaabbaaaaaabba
ababaaabababbbbaaaaabbababbbbaab
baabbbbabaaabaaaabaababaaaabbaba
baababbabbbbbabbbaabaabb
bbbababbbababbaaaabaabbbbbbbbabaabbaaabb
baabaabaababbaaaababaaabbbbbbbba
babbaababbbbababbaabaabb
aabbbabaaabbaaaaabbaaabababaabba
bababbbbbaabaaabbbaababa
bbbababbbaabbabbabbbaabaabababaa
bababbaaaabaabbbbbbbaaab
bababbabaabbaaaabbbaaaba
baabbaabaabaabababaaaaaababaabab
baabaaabbbaabaaabbbbbbab
abbbbbbabbaabbbabbaabbbaabbaabbababbaabb
babbbaaaabaabbbbaabbaabb
baabbbababbbababbabaaaaabbababab
babababbaaabababbbbababbaaaababa
abbbbaaaaabbabbaabbaaaaa
bbbbabaababbbbaaaaaaaaab
abbabbaabbbbaabbbabaabbbbaaabaaaaaaabaabbbbbbbaa
bababbbbbbababaaaabaabba
bbbbbaabbbabaababaaaabab
aaabaabbbbaababbaababbbaabbbbbbabababbab
aaaaaaaaabaababbbbabbaab
abababbbabbabaaabaaabbaabbaaaabb
babbbaaabaabaaaaabbbaabaabbbbbbaaaabbabbabbbabab
babbabbbbbbbaabbaaaabaaa
baabbbbaabbbabbabbaabaab
bbbbabbabbababbabbbabbabbabbbaaaaaaabbabaaaaaabb
abbaabbbababbaaabaaaabaa
babbbaaababababbbaabbbbb
bababbaaaaababbaaabbaabb
bbbbabbbbbaabbaaabbbabbabababbbbbababbabbabbabba
abbabaaabbaabbaababbbbaaaaababbaabbababb
baababbabbbbababbbbabbabbbbbbaaaabbaabba
babbbbbaabbabbbbabbaabba
baaaabbbabaabbbbbaaaaabbbbbabbabaaaabbbabbaaabab
abbabbbbbbbaababababaaaa
baaabaabbbbbababbabaabbbbbbbbbbabbabbaab
bbbbbaabbabaaabaaababbabbabbbbabaabaabaa
bbaaaaababbbbabababbabbbaaababbb
aababbbaabbbaabbabaababababaaaab
bbbabbbbaaaaababaabbbbba
bbabaabaabbbabbabbbbbaabbbbbabababaaaababbbaaaabbbbbbabb
bbbbbabaabbbbababbababab
bbbaabbaabbbbbbabbbabbbaabbbbaaaabababab
baaabaaaabaaaabaaababbaabaabbabbababbbbabbaaabab
baaabaaaaaabaaaaabbbbabb
abaaaababbabbabaabaaaaaababbaaaaabbbbabb
baaabbbababababbaaaabbbb
aaabbbaaabaaabbababaabbbbbaabaabbbaaabbb
bbbababbaaababababbbbaaaaaabaabbbaabbbbb
abaabbbbababbbbaabbaabbbaabaababbbbaaaba
aabbbabbabaabababaabaaabbbbabbaaaaabbbbbbaaaabab
aaaaabaaabaababababbbbbb
bbbbababbaabbbbababababaabbbaaab
baaabbbbaaabbaaababbaabb
aabbbabbbbbbbaababbabbab
babaabaaabbbbbbaabaaaabbbbaabaaaaabbaabaaabbabbb
baaaabbbaabaabbbaaaababb
aabbababaaabababbabbabbaaabaabaaaababaaa
abbbbbabbaabaaababbbaabbabbaabababababbbaaaabbabaabbbbbabbabbbaabbbaaaba
baababbaababbaaaaaaabbba
bbbbaabbbaaaabbbbaaaaaaa
bbbbababaaaaaabaaaababbb
aabaaaaabbaaaaabbbbababbbbbaabbabbbbbabb
bbbbaababaabbabbabbbaabbbbbbaabaabaabbbbabbababbbbbaaaaa
abbaaaabbbabbabaababbaaaaababbabababbbabababbabb
bbababbbbaaaabbbabbbbbaa
bbaabbaabbbbabaaabbbbaaababababbabbbbbaabbaabaab
bbaabbbabbbbbaaaaabbabaabaaabbbbababbbbb
baababbabbbababbbbbbbbab
abbbbbbaaaabbaaaaaaaabba
bbaabbbababbabbaaaaabaab
bbbaabaababbbbbabbabbaaa
bbababbbabbbaabbbaabbbbb
bbaaaabaaaabaaaaaabbabbabaaabbaabbbababa
aaabababaaabbbbaabaaabbb
bbaababbaabbabbabaababbb
babbbabbaabbabbaaaabbaaabbbaabaababaaabbaabbbbabbbaaaabb
babbbbababbbaababaababbb
bbbbabbabababababbbbaabaaabaabbbabbaabbbbbaabbaabbabaaaabbbaaaba
aabaaaaaabbaaaabbbbababbbbaaabaabbaabbabbbabbbaa
bababbaabaaabaaabababbbbbbaaabbbabbababa
aaabbbbaaaaaaaaabbbaaabb
bbbbabbabbbbaabbbaaabbaabbbaaaabbaaaabab
babaabaabaaaabbbbaaaabba
abbbaabbbabbabbbbaaabaaaabbabbaabbbaaabb
bbbbaabbaababbabaaabbaaaabaabbaaabbabbab
abbbbaaaabbbaabaabaaaaaabbaaaabaaabababa
baaabaaaabaaaaababbabbbbbababbba
baabaaaabbaaaaabaaababbaababaabbaabaabaa
baaababbbaabbaababbbabaa
babbbbaaaaababbababbbbbb
bbaabaaaaabbabbabaaaabbbaabaaabbbbabaaaaabbababa
baabbbaaaabbaaaabbaaaabb
baabbbbabaabaaabaabaabaa
bbbabbbbbbbabbaaababaaababbabaab
aaaaaabaaabbbbaaabaaabaa
ababbbbaabbaababaababbbb
abaaaaababbbbbabbbbbbbba
aababbbabbaaaaababbbbbaabbabaaabaaababaa
aaabaaaaabbbabbaabaaabbb
bbaababbbbbbaabaabbaaaaa
bbababbbbababbaabaaabbbbabaaaaababbbbaabaaaabbba
abbabaaabbaabaaaababaaaa
aaabaabbabaaaababaaabaaaaabbbabbbabbbbabbbabbababaabbbbbaababababababaab
abaabababbababbbbbbaaaba
abbbbababbaabbbaaaababaa
aaaaabaaaababbbaaaaabbba
abbaababbbbabaababaababbbbabaabbbbbbbbaa
abbbaaaabbbbabbabbaaaaaabaaabaababbaaabbababaaaaaabbaaabbbabbaaaaababababababbbbbaaaabab
ababbaaababaabbbbabaaababbbaabbb
bbbaabbabbbaabaaaabbbbaaaaaaabaaaababbabbbabbbbaabaabbaabbbababa
bbbbaabbabbbbabababaaaab
aaabbaaaaabaaaaababbbbbabbabbbab
bbbbaaaaabbbbbbabbaababa
abaaaabbbbababbabaaaabbbbabbbbbabbababaabbabbbabaabaabbabababbba
baaabbbabbbabbaabbabaaab
aaababababaabbbbbabaaaab
bbaaabaaaabaabbbbabbbabababaaaaa
abababaaaabbbbaabbabbbaababbbbaaaaaaaabbabababbbbaaaabaa
baabbbbabaababbabbabbbba
baabbbaaaabaabbbabababab
abaababbbbbababbaababbabababbbab
baaabaabbabababaaaaaaaaaabbabbbbbaaaabba
baaaaabbbaaabbbababaaaaa
baabbaaabbaabbabbabbbbbb
babbababaaabababaabbaabb
bbbabbbbaabbabbabbbaaaaa
bbbabbabababbaaabbbaaabb
aaabababababbaaabbabababbaaabbabaaaaabbbbabbbbaaaaabbaab
aabbbbaabaaaabbbbbabbbaa
bbaabbaaaaaaaababbaabbaabbaabaaabaaaaaaaababbaab
bababbaabbaaaaabbabaabbaababababaaaaababaabbaabbbbabaaabbaaaabbabaabbbbaabbabbbb
baabaababbbbaaaababbbbbb
baaabbaaabbbaabaaaaaabaabbbabbababbaabbbaaabaaaaaaaabababbbaabbbbbbaaaabababbabbbababaab
aaababbabbaabaaaaabaaaab
bbbabbabbbbbababaabbabbababababbaababbbaaababaaa
babbbabbbbaaaaabbbaaabaabbbaaaaa
bbaaabbabbaaabaaaaaabaab
bababbbbbaabbaaabaaabaaabababbabbaabaabaabaaabaa
bbbbbabababbbbaaaaabababaaaabbabaabbbbab
bbbbaaaaaababbbaabaaaabbaabbaabb
babaabaabbaaaaabbaabaabababbbbbaababbaaabaaaabbbbbbbbbabaabaabaa
babbbabaaaaaaaaaaababaaa
bababbabbabbbbbaaaababbb
abbaaababbaaaababaaababa
bababbaabaaababbbbbbaaaabbbaabababbabbba
baaabbbbaabbbaaaaaaabbababaaaaaaabbabbababbbaaaaababaabb
babbbabbbbababbaabbbaaaabaaabbbabbababbabbbbbaabaaaaababaaabaaaa
ababbbbbbbbbabbaaabaabaa
bababbaababbbbaaaaababababaaaaabbbaaabbb
bbbbbaabbbaabbaaaaabababbaababab
aabaaabbabbabbbbaabaaaaaaaabbbbb
bbaabbabbbbbabbaababaaba
aaabbbbaaabbabbababaabbbaabbababbabbaaabaabbbbba
babbbbabaaaabbabbbbbbabb
babbbabaaabaaaaaaabbbbaababbaabaaababaababbaaaaa
aaabaaaaaabbabbaaabbbabaabbaaabaabbaaaaa
babababbbbbbabaaabbbbbbaababaaaaaabaabaa
aabbabbababbbaaabbbaabbb
aabbaaaaabbaaaaaaaabbbaaaaababbbbbbabbabbbbabaabababaaaaababbbaaaabbbaab
bbbabbaabbbbaaaaabaabbba
babbbabbaabaabbbaabbabbb
abaaabbabaaaabbbaaaaabaaababaaabbabbbabaabaaabababababab
aabbaaaabbbbbaaababbaabababbaababbaaaabaabbabbbaabbaaabbbbabababbaaaaaaa
bbbbbbbbbbaaaababbbbbabbaaabaaababbbababaaabaaba
aabbbababaabbaaaabbaabba
bbbbbaabbbbaabbabbbbbababaabbbbbaaaaabba
abbabababbbabaababaaaabbbbbaaabbbaabababbbaabbbabbaabababbabbbba
aabbbabbababbbbbaaabbbab
bbbbbaaabbbababbbbbabbbaaaabbababbabbbaa
bbbabaababbaabbbabbbbabb
bbaabbbaaabbababbababaaa
abbabbbbbbaaabbaabbbabbb
abbbbaaaaabbaabaabbaabba
bbababaabbbabaabaababaabbbaaaaabaababbaababbaabbaaabbbabbabaaaaa
baaabbaabbbabbabbaabaabb
bbbabbbbabbbbabaababaaababbabbbabbababab
bbbbbaaababaaabaaabbbababbababababbaabba
baabbaababbbabbabaabbabbabbbabaaaaabbabb
bbbbbaaabbbabbaabbabbaab
babbbababbaaaaabbabbbbbb
abaaaabaaaababbaaabababa
bbbababaaaabbbbabbbbabbaaabbaaaababbaaaababbaaaaabbaaaaa
abbabbaaaaaabbabbbaaabab
bbbaabababaabbbbbabaabab
babbbaaaababbbbbbaaaabba
bbaababbbbbbababbbaabbbb
aabbbbaabaaabbbbababbaaabaaabbababbabbbbbbabaaaa
bbababbabababbaabbaaabbaabaaabbabaaabbaaaaaabaaaababaaaaabbbbbaabbabaaaaaabbabaaaaaabaab
baaabbbbbabbaababbbaaaaabbbaaabaabbaababbaababbbbbbbbbbaaabbabbaabbaabbaaababbbaaaaabbabbbbbaaba
aaaaaaaabaaaaabbbaabbaba
baaaabbbbaabaaaababaaaaa
baaaabbbbaaaaaabaaabbbbabbabaabaababbabaaaaabaabababbbaa
bbbbabbbabaaaabaabbabbaaabaabaaa
baaabbaababbbbbaaabbaabaaabaaabbabaabaaabbabababababaaba
bbaaaababaabaabaaaabbbaaaabbaaaabbbbbabb
bbbbabbbbbababbbbbabaaab
bababababbbbaababaababbaababbbbbaabaabba
bbaabbbaaaaaaababababbba
bbbbaabaabaaaababbabbabb
bbbaabbaabbbbaaaababbabb
abbaaaabbaabbabbaabbbbaabaabbaba
abbbbbbabaaaaababbaaabababbbbabbaabbbbba
babbabbabbbaabaabbbaabaabbaaaaaababbbbbb
abbaaaabababbaaaaaabbbbb
bbaaaababbaaabbaabbbbbbaabbaaaabbbabbaabababbbaabaabbbbb
aababaabababbabbaaabbaababaabbbabaaaabbaabbaaabbbbbbaabbaaababbabababbaaaaabaaba
bbbbaabbbbaabbaaaaababbaabbbaabbbbbabaaa
abbbbababbbaababbabbbaaabaabbaabbbbaaabb
aaaaababbaaabbabaabaabaaaaabaabaabbbabaaabbbabaababaabaa
aabbbbbbabaabaababaaababbabbbabbababaabaaaabbabb
bbaabaaabaaababbaaaaabababbaabbbaaababbbbababaaa
bbabaaabbabbbabaabaaaaaababbbababaaaaaaaaaaabbabbabaabbabbbaaaabaaaababb
baaaabbbbaaabbabbabbbbbabaaababbaabbbabbaaabbbabbbabbbbbaabaabaa
babbaabababbbaaabaababbaababbabbbbbabaaabbabaaababbbabbbbbbababaabbaaaaa
abaabbababaabbabaaaabaaa
bbababbaabbaaababaabbaba
baaabbaaaabbababbaabaabb
aabbbbaabababbabbbabaabaaaaaaabb
bbbabbaabbbbaabaaabababb
aaabbbbabababbaabaaaabab
abababbbbbabaabbbbbaabbabbabbaabbbaaaabb
aaaaaaaaabbaaabaabbaaabb
babbabbaabbbaababbabbbba
aaaaaabaaabaaabbbabababbbbabbabb
babaaabbbbbabaaababbabaabaaaabab
aaababbbababbbaaababbaabbbbbababaababbbaaabaabbabaababbbbbaabbbbbabaaabababbbbaaaaaabbabbbababaa
abaababbaabbaaaaabbbaaaa
abbaaaababbabaaabbaabbabbaabbbaabaababaa
aaaaabaaaabbaaaaabababaa
baaaaaababaaaabaababbaaaaaabbbabbaababababaaabaaabbbbabbaabaaabb
bbbbabaabbbbbaabbabbaabaabbaaabbbbabaaaababbbaab
abbabbbbabbabaaaabbabbba
baaabbbbbabbababaaaabbbb
abaabababaaabbaaaaabaabbabaaaaabbabbababbbaababa
abaaaabaaababaabbabbbbaabaabaabaaaabaaaababaaabbaabbbaabbbbaabbb
bbaaabbabbbababbbaaabbaaaaababbb
bbaaabbabaabaaaabbabbabaaaaaaaaaabbaaaabbbabaabaababbababbbbbbba
aababbbabbababbbabaabbba
aabbbabbbaaabbabbbbbbbbbbbbabaababbaababababbbaaabbaabaa
aaaaaaaaabaaaaaabbbabbaababbbaaaaaabaaab
bbaaabaabbabbabaabbabbaaababbaab
abaaabbaaaabbaaaabaabababbbbbbaaaaabbbbb
baabbaababaababaaabaaabbabaaabaa
bbbabbbabbababbbaaababaa
bbabaabbbbbbaababbabbbbb
abbbbababbbabbaaabbbabab
baaabbbababaabbbbbabbaab
aaaaaaaaaabaaabbababaabb
bababbaaabbaabbbaabbaaab
babbaababbaaaabaabaababbaaaabaaa
bbbabbabaabaaabbaaaabbabababbaaaabaaabbb
aabaaaaababaabaaaaaababb
aabbabababbaababaaaababb
bbbbabbabbbaabbabababbbbbbaaaabababaabbaaaabbbbbaabbbbba
ababaaabababbbbaabbaaabbabbbbaaaaabbbaabbbabbabaabaabaab
aabbababbabbabbbaaabbaba
abaabbabbaabaaaabbbaaabb
babaaabaaabbaababbbabaaa
bababbabbaabbabbaabbaaaaaabaaabbabbabbbbaaabbaba
babbabbaabaabbabaababbbb
babbbbaaabaaabbabbaabbbabbbbabbbbbabaababbbbaaababaabaaabbabbbaaaaaabaab
baabbaabbbbbbaaabbabbbbb
bbbababbbaabbbaabaabbbbabbababbbbaaaaabbaabbbaab
aabbaaaaabbabbaaababbbbbbaabbbbaaaaabbbbbbababab
baabbabbaaabbbaabbbbabababbaaabb
babbabbbbbaaaaabbbaaaaaaaaaabaaabaaaaaaaaabbbbbbbaaaabbbababaabbaabbbaaa
bbbaabbabbabaabaabaabbaa
abbaaaabbbbabbabbaabaaaaabaaaaabbbbabbabbaababaaabaabbbaaabbabbb
bbbabaabbbbaababaaababaa
aabaabbbbaabaabbbabaaaaaabbbbbbb
aaabaaaabaaabbaabbaabbbaabababab
abbaaabaabaaaabaabbbbbab
aaaaabaabaaabbaaababaabaaaaaabbabbaaabbbaaaaaababbbbaabbbaabaabababbbaababababab
bbbbaaaabbbaabaaaabaaabbababbaaaaaaabbbababaaaabbbbaaaab
bbbabaabbbaaaaabbabbaaab
abbaaaabaaaaaabaaabbbbaaabbbbaababaabbba
baabbaaaaaabbaaabaababbb
aaabaabbbabbaabababaabbbaabbaababaabaaababaaabbb
bbabaababbbabbabaabbaaab
bbaaaaabbbaabaaaaaabbaaa
bbbbbaaabbbabaabbaababbabaaaabbaabbababa
aabbbbaabbaaabaababbbbbababbbbbaabbaabbbbaaaabbbababbaab
aabbbabbaaabbaaabaababbaabaaaaaaababaaabaaabbbbaaabaaabaaaabbaabababaaaabaaabababbbaaaab
aaabaaaabbbbabaaababbbbbabbaaaaa
abaabbbbabbaaabaaaaaabaabbbbbbaa
bbaaabaaaaaabbabaabbbbab
baaaaaabaaababbabbbbaaab
bbabaabbbabbbaaaaabbabbaaabbaababbabaabbaaabaaaaaaabaaba
abbbbbaabaabbbabbabbaaaabaaaaaba
aaabbaaabbbbaaaababaabbbbbbabbbaaabaaabbbaabbabaaabbaaab
babbaababbbbaaaabbbbaabaaabbbbaaabbabbba
baababbabbaaaaabbbababaabbabbaaa
aabbababbbaaaabaabbabaaabbbbbaaabaaabbbaabbbabab
abbbaabaabaabaababababbaabbbbaabbbabbaabbaabbaaa
baaabaaabaaabaaabaaaaaba
bbbabaabaabbbabbbbabbaaa
bbaaabaabbbbaaaabbabbabaabbababb
abababbbabaaabbabaaaabbbaaaabbabbaababbabbaabbbb
bbbbbaababbaaaabbaaabaababbbaaab
baabbabbbbaaaababaabbaaabaababaabaaaabab
baababbaabbbbbbaaabbabbabbbbababbabbbbbbaabbaabb
baabaaaabaaabbbaabababbbaaabbaba
abaabbabbaabbaaaaaabaaababbaabaabbbaaaaa
baabaaaaabbaabbbabaabbba
bbbaabbababbaabaaaaaaabb
bbbbabaababaabbbbbababaabaaabaabaaaabbaa
aabaababbaabbbbababbaabababaabaabaabbaaaabababab
abaaaaabbbbaabaabaabbaba
bbbbaabbbaabaaabaabbaababaabbabbbabaaaaaaaabaaba
aabbabbaabaaaaaabbabaababbbaabaababaaabb
abaaaababbbaabaaaabaaaaabaabaaaabaaabaaaaaaabaab
aaaaaabaaabbbababbbbbababbbbababaabbbaab
bbbabbababbaabbbabababaa
baabbbaaaababbbabbbaaaba
baaaaaabaabbbabbbaaaaaabababaaba
bbbbaaaaabbbabbabbbbaabaaaaaababbbaabbbb
aaabababbaabbaaaaabbbbab
abbbbaaabbaabbababaaabbabaaaabba
bbaaaababaaabbaaabbbaaaa
ababbbbbaaaaaabaabbabbbbaaabbbbbabababaa
bbabaabaabbabaaabbbaabbb
aababbbaabbbabbabaaabbbbbbabaabaabbbbaaaabaabbaabababaab
aababbabbabbabbaabaaaaaabbbababbabbabbbbabbaabba
aabbbbbababaaababbaaabaababababbbabbaaabaaabbbaabbbabbab
ababbbabbabaaabaabaabaaababaaaaa
abbbbbbabbbaabbaabbabaaabbbbabaaabbbbbaa
bbaaaaabaabbaabaaabbabaa
bbbbaabbabbbaababbaababa
babababbababbbbabbabbaaa
aabaabbbaaabbbaabbbbabaaabbababa
abbbbbabaaabbaaaaabbbabaabbbbaaabbbaaabbbaaababa
baabbaaaaaabaabbbaabbbaaaaabbbaaaabbaababaaaabbbaaaabbba
abaaabbaababbaaababbaabaaaaaabababaabaab
bbbabbabaababbbabaababaa
bbaabbabbbbaabbabbbbaaab
abbbbabababbbabbbbbbabbbbbabaaaaabbaaabb
aabaabbbbbbbaabbabbabbbbaabaabbbbaabbaaaabaabbabaaaababbabbabbab
aabaaaaabaaabaabbbabbaabaababbabbbaababababbbbab
baabaabaabbaababababaaba
aabaaaaaabbbbbabbaabaabb
aabaaabbaaabbbbaaaaaaaaabaaaaaba
babbbabbbbbbabbaaaabbaaabababbbbabbbaabbbaababbabbaabbbbabbbbbaabaaaabba
baabaababaaabbbbabbaabba
bbababaabbaabbbaabbbaabbababaaabbababbaaabbbaaabbbaabbbb
abaaabbabbaaabbaaabaabaa
babababbabbabbbbbababbaaaaabaabbaabaabbbabaaabababababaabaababab
bbabaabbaababaabbbaabaaaabbbbaabaaaaaabb
aababbaaabababbbbababbbbbbbbabbaabbaaaaabaababaa
abaabbabbaaabbaabaaabbba
bbbbaabaaababbababbbbbaa
baaabbbbbbbbbaaabaabbaaabbaabaab
aabbbababbababaaabbbaabbbbabaaab
bbbaabaaabbbabbaabbbbaaaabbbaabbabababbaabbbababbbaabbbb
aababbbabbabaababaaababbaabbbbaabbaabababbaaaabbaababaaa
bbaababbbabaabaaaabbbbbb
bbbabbbbabbabaaaababbbbabbbabaababaabbbbaababbbbabbbaaababbbabaabbabbbaa
bababbbbaabbaaaabbabbbab
bbabbabaaabaabbbaabbabaa
baabaaaaababbaaabbbbbabb
bababababbbbabbaabbaaaabaaabbabb
baaaaaababaaaaabbbaaabbb
ababbbbababababaabbabbab
baabbbaaabbabbbbbbaaaabb
bbbabaabbbaabbbabbabbbbb
aabaababaaaabbabbabbabaa
bbbbbabaabbbaaaabbaababaabaaababbbaabbabaababaaabbbaabaa
abbbaababababbbbabababba
bababbabbbbbabbabbbaababbaaabbabbabaabbaaabbbaabababbbaa
baabbbaabbbabbbbbbaaabab
abbbaabbaabaaabbbbbbababbbbbaabbbabaaabbabbbaaababbabbab
bbbbaaaaababbbbbaabbabbabbbbbaababbababbbabbaaaabbabaaab
bbbabbbbbaabaaababbbbaaaabbbabbbabbbabab
abbbaababbbbbbbbaaaabbabbaaabbbb
bbbababbaabbbabaabbbabab
ababbaaabbaaaaabaaaababa
bbbbabbaabaabbbabbabbbbbbbbbabbbaabbbababaaaabbaaaaaaabbbbaaaaaa
bbabaabbabababbbaaabbbaabaaabbaaabababbbabbbaaaaaaaabbaa
aaaaaaaaaaabbbbaaaabbabbaaaaabba