-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path24.py
executable file
·639 lines (597 loc) · 20.8 KB
/
24.py
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
#!/usr/bin/env python3
# HELPER FUNCTIONS
import re
from collections import defaultdict
from functools import cache
def parser(text) -> list:
return [s for s in text.strip().split("\n")]
def read_input() -> str:
with open(__file__, encoding="utf-8") as f:
c = f.read()
data = c[c.rindex("🎅") + 1: c.rindex("⛄")].rstrip()
return data
# SANDBOX
# https://www.redblobgames.com/grids/hexagons/#coordinates-offset
# “even-q” vertical layout
# shoves even columns down
HEX_GRID_EVEN_Q = """
/ -4,-2 \_____/ -2,-2 \_____/ 0,-2 \_____/ 2,-2 \_____/ 4,-2 \
\ / \ / \ / \ / \ /
\_____/ -3,-1 \_____/ -1,-1 \_____/ 1,-1 \_____/ 3,-1 \_____/
/ \ / \ / \ / \ / \
/ -4,-1 \_____/ -2,-1 \_____/ 0,-1 \_____/ 2,-1 \_____/ 4,-1 \
\ / \ / \ nw / \ / \ /
\_____/ -3,0 \_____/ -1,0 \_____/ 1,0 \_____/ 3,0 \_____/
/ \ w / \ w / \ ne / \ / \
/ -4,0 \_____/ -2,0 \_____/ 0,0 \_____/ 2,0 \_____/ 4,0 \
\ / \ / \ / \ / \ /
\_____/ -3,1 \_____/ -1,1 \_____/ 1,1 \_____/ 3,1 \_____/
/ \ sw / \ sw / \ e / \ / \
/ -4,1 \_____/ -2,1 \_____/ 0,1 \_____/ 2,1 \_____/ 4,1 \
\ / \ / \ se / \ / \ /
\_____/ -3,2 \_____/ -1,2 \_____/ 1,2 \_____/ 3,2 \_____/
/ \ / \ / \ / \ / \
/ -4,2 \_____/ -2,2 \_____/ 0,2 \_____/ 2,2 \_____/ 4,2 \
"""
HEX_GRID_ODD_Q = """
\_____/ -1,-3 \_____/ 1,-3 \
/ \ / \ /
/ -2,-2 \_____/ 0,-2 \_____/
\ / \ / \
\_____/ -1,-2 \_____/ 1,-2 \
/ \ / \ /
/ -2,-1 \_____/ 0,-1 \_____/
\ / \ nw / \
\_____/ -1,-1 \_____/ 1,-1 \
/ \ w / \ ne /
/ -2,0 \_____/ 0,0 \_____/
\ / \ / \
\_____/ -1,0 \_____/ 1,0 \
/ \ sw / \ e /
/ -2,1 \_____/ 0,1 \_____/
\ / \ se / \
\_____/ -1,1 \_____/ 1,1 \
"""
def print_hex_grid(pattern: dict, range_x: range, range_y: range):
hex_ = """
_____
/ \
/(x1,y1)\_____
\ /
\_____/(x2,y2)
""".split("\n")
hex_ = [l for l in hex_ if l.strip()]
# points are sorted by y ascending
floor = [(x, y) for y in range_y for x in range_x]
rows = floor[-1][1] - floor[0][1] + 1
cols = len(floor) // rows
points_by_rows = [list(zip(floor[start:end:2], floor[start + 1:end:2])) for r in range(0, rows)
# just using walrus
if (start := r * cols) < (end := (r + 1) * cols)]
pattern = defaultdict(int, {k: pattern[k] for k in sorted(pattern, key=lambda tile: tile[1]) if pattern[k] == 1})
str_list, r_size = [], len(points_by_rows[0])
for r_i, r in enumerate(points_by_rows):
l_start = 0 if r_i == 0 else 1
for line in range(l_start, len(hex_)):
print_line = ""
for c_i, cell in enumerate(r):
h_start = 1 if line == 4 and c_i != 0 else 0
start = hex_[line][h_start:]
start = start.replace("(x1,y1)", f"{cell[0][0]},{cell[0][1]}"[:7].center(7)) \
.replace("(x2,y2)", f"{cell[1][0]},{cell[1][1]}"[:7].center(7))
if line == 1 and pattern[cell[0]] == 1:
start = start.replace("/ \\", "/*****\\")
elif line == 3 and pattern[cell[1]] == 1:
start = start.replace("/ ", "/*****")
print_line += start
finish = ""
if c_i == r_size - 1 and line > 0:
finish = "\\" if line in (3, 4) else " /" if line == 1 else "/"
print_line += finish
str_list.append(print_line)
print("\n".join(str_list))
# MAIN FUNCTIONS
DIRS = "e, se, sw, w, nw, ne".split(", ")
HEX_COORDS_EVEN_Q = {
'e': lambda x, y: (x + 1, y + abs((x + 1) % 2)),
'se': lambda x, y: (x, y + 1),
'sw': lambda x, y: (x - 1, y + abs((x + 1) % 2)),
'w': lambda x, y: (x - 1, y - abs(x % 2)),
'nw': lambda x, y: (x, y - 1),
'ne': lambda x, y: (x + 1, y - abs(x % 2))
}
HEX_COORDS_ODD_Q = {
'e': lambda x, y: (x + 1, y + abs(x % 2)),
'se': lambda x, y: (x, y + 1),
'sw': lambda x, y: (x - 1, y + abs(x % 2)),
'w': lambda x, y: (x - 1, y - abs((x + 1) % 2)),
'nw': lambda x, y: (x, y - 1),
'ne': lambda x, y: (x + 1, y - abs((x + 1) % 2))
}
regex = re.compile(f"{'|'.join(DIRS)}")
def hex_move(origin: tuple, _dir: str) -> tuple:
return HEX_COORDS_EVEN_Q[_dir](*origin)
def hex_move_odd_q(origin: tuple, _dir: str) -> tuple:
return HEX_COORDS_ODD_Q[_dir](*origin)
def to_hex_coord(tile: str) -> tuple:
moves = regex.findall(tile)
_from = (0, 0)
for m in moves:
to = hex_move(_from, m)
_from = to
return _from
def flip(tiles):
flipped = defaultdict(int)
for t in tiles:
xy = to_hex_coord(t)
flipped[xy] ^= 1
return flipped
def part1(tiles: list) -> int:
flipped = flip(tiles)
return sum(flipped.values())
@cache
def neighbors_even_q(tile: tuple) -> list:
return [hex_move(tile, k) for k in HEX_COORDS_EVEN_Q]
@cache
def neighbors_odd_q(tile: tuple) -> list:
return [hex_move_odd_q(tile, k) for k in HEX_COORDS_ODD_Q]
def part2(tiles: list, days=100) -> int:
pattern = flip(tiles)
for _ in range(days):
# print(f"Day {_}\n\n")
pattern, range_x, range_y = expand_area(pattern)
new_day = defaultdict(int)
for y in range_y:
for x in range_x:
tile = (x, y)
color = pattern[tile]
new_day[tile] = color
counter = sum(pattern[nbr] for nbr in neighbors_even_q(tile))
if color == 1 and counter == 0 or counter > 2:
new_day[tile] = 0
if color == 0 and counter == 2:
new_day[tile] = 1
pattern = new_day
return sum(pattern.values())
def expand_area(pattern):
"""
expand visible area
"""
min_x, min_y, max_x, max_y = 0, 0, 0, 0
for x, y in pattern.keys():
if x < min_x:
min_x = x
elif x > max_x:
max_x = x
elif y < min_y:
min_y = y
elif y > max_y:
max_y = y
# take care of odd/even min_x left top cell x, odd - is even-q, even - is odd-q
min_x, min_y, max_x, max_y = min_x - (1 if min_x % 2 else 2), min_y - 1, max_x + 2, max_y + 2,
# print_hex_grid(pattern, range(min_x, max_x), range(min_y, max_y))
return pattern, range(min_x, max_x), range(min_y, max_y)
# TEST
def test() -> bool:
assert hex_move((3, -1), "ne") == (4, -2)
assert hex_move((-2, 1), "ne") == (-1, 1)
assert flip(parser("nwwswee")) == {(0, 0): 1}
assert flip(parser("esew")) == {(0, 1): 1}
given = parser("""
sesenwnenenewseeswwswswwnenewsewsw
neeenesenwnwwswnenewnwwsewnenwseswesw
seswneswswsenwwnwse
nwnwneseeswswnenewneswwnewseswneseene
swweswneswnenwsewnwneneseenw
eesenwseswswnenwswnwnwsewwnwsene
sewnenenenesenwsewnenwwwse
wenwwweseeeweswwwnwwe
wsweesenenewnwwnwsenewsenwwsesesenwne
neeswseenwwswnwswswnw
nenwswwsewswnenenewsenwsenwnesesenew
enewnwewneswsewnwswenweswnenwsenwsw
sweneswneswneneenwnewenewwneswswnese
swwesenesewenwneswnwwneseswwne
enesenwswwswneneswsenwnewswseenwsese
wnwnesenesenenwwnenwsewesewsesesew
nenewswnwewswnenesenwnesewesw
eneswnwswnwsenenwnwnwwseeswneewsenese
neswnwewnwnwseenwseesewsenwsweewe
wseweeenwnesenwwwswnew
""")
assert part1(given) == 10
# part 2
assert neighbors_even_q((0, 0)) == [(1, 1), (0, 1), (-1, 1), (-1, 0), (0, -1), (1, 0)]
assert neighbors_odd_q((0, 0)) == [(1, 0), (0, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]
assert neighbors_even_q((3, -1)) == [(4, -1), (3, 0), (2, -1), (2, -2), (3, -2), (4, -2)]
assert neighbors_even_q((-3, -1)) == [(-2, -1), (-3, 0), (-4, -1), (-4, -2), (-3, -2), (-2, -2)]
assert neighbors_odd_q((1, -1)) == [(2, 0), (1, 0), (0, 0), (0, -1), (1, -2), (2, -1)]
assert neighbors_odd_q((-2, 2)) == [(-1, 2), (-2, 3), (-3, 2), (-3, 1), (-2, 1), (-1, 1)]
assert part2(given, 1) == 15
assert part2(given, 2) == 12
assert part2(given, 3) == 25
assert part2(given, 4) == 14
assert part2(given, 5) == 23
assert part2(given, 10) == 37
assert part2(given, 30) == 259
assert part2(given, 40) == 406
assert part2(given, 50) == 566
assert part2(given, 90) == 1844
assert part2(given, 100) == 2208
return True
if __name__ == '__main__':
assert test()
input = parser(read_input())
# ONE #1
part_1 = part1(input)
print(part_1)
assert part_1 == 320
# # TWO #2
part_2 = part2(input)
print(part_2)
# assert part_2 == 286194102744
# INPUT
"""🎅
swseeneeswneenwneenwswenenwnewswnesw
neneswnwnwnenenenwnenenenenenwne
sweseeseeeeenwe
wswseneeenweeeeeeneeeseeseswe
nwnwnwnenwnwnwswnwnwswnwnwnwnwnwnwnenwee
ewnenenwnwenenwswsesenenweseeew
seswseseseseswneswsesesesesew
enenwneeneswnwswneneneswseneeneneenwne
sewsesesenwseneswsesenenenewseseesesesesw
eswwseswnwsesenweswnweseswsewsesese
nwnwnwwnwnwswnwnwwnwnwswnwnweenwnww
sewwsenwwwnwnewwwwwwnewnwsenww
swswnwswneseswswseswswwswswnenesweseeswnw
wwwsewswswwswsweswswswnwnweneswsww
swwwwwwwswwswsweswsw
seseswwwswswswseneseswseesenwse
nweeneseswswswswweswswneswswswnewne
nweenwseeseeseeeseseswseeswseese
wwnwswewnesewwwwwwwwswwsww
wseseeweenwesesesewnweeseswesesee
seeswnenwewneeeeeswenwnewswnee
wneseswswseesenwswnwesweeeneeene
neswswseseswsesesenwseseseswseswesewsesw
nwnwnwnwnwnenwwnwsenesenwnwnwnwnwnwswnwnw
esewwnwnewseswwwweswwww
wnwnwnwwneenwnwnwnwnewnwsenwnwenw
wsewwwwnewswwwwwewwswnenesw
seseswwseseswsweswesweswnwnwswswwswse
nenwnwnwsenenenwnwnwnwnwnwnwnwnw
nenenenenenwnesenewnewnewneseeeene
swneswswseseswseseswswseswwesenwswswsesw
wsweswwneswwswwnwswsweswsewsesww
swswnewwswwswnwwnwswsesenwwewww
nwwnwenwnwwwswsewwnwwnwnwnwnwnw
wswnesenwnwwseweswnweseseseesenesese
seswswswseswseswswnwesesenwseswswswnwsw
eenenwesweeneswneswewenwenesene
nwswnwenesesesenwseseeeneeweseseswwse
esenenwnweswnewwswenenesewswseesw
wwwswnwwwsenenwsenweswwneswwwnww
wswswswenweweseswneswnwswwseeswnese
neswneenwseeswnwsewnewnwwwesww
enwnwwsenwnwenwwnwenwwwnwnwnwnenesw
seeeneeeneseeewsewseweweese
ewwwewwswswswswsewwwswwnwsww
neneseseneeneneeneeeenwwe
nwnenwneneenwnenenenwnwswnwswseenenenew
swnenwnwswnwswnwnenwnenwnwnwnwnwnwnwswnwne
eseseswswswnwswseseswseswswsenesenwseswse
enwswnenweseneeeeesenwsweeswee
seswnwnwnenwnwnwnwswnwne
swesewseeseeeseweweseeenweee
nwsewseseweneseseneseseseenwseswseseese
ewnenwswwwwwwwwwwnwsewwwwsew
neswnwnwswswswseseweseseseeseswswwswse
eswnwnwneseenenwwnwnwsenwwnwsenenwne
seenwseswswswnwseswsenwswswswswseseesw
seneswenewsesenwswnesewseeseneewsese
nweewswswnwseswsweneseseeswnw
neneswnenenwneesenwseneneewewneene
nenwnenwnwnwwneneneenene
seweswseseneswswsewswswseswnenene
sewnwswsenweseweswenewse
seseseseseeswseseswsenwsesenwseswsesese
eenenweeneeeseee
swseswseseswnenesesenwnwneseneswwwnwsw
swewnewwwweswwsewswwswswswsww
seswswswswneswswswsw
senwseswswnwswswswswwswwwswwswwswnee
seseswswseesewwneswseneseseswsweswsw
swwswwswswsewwswswwsenwneswswwsww
wwswswnwwewwwswswswwwewswww
nwnenenenenenenenwneswnenewsenenenenwne
neswweeeeneeseeneneeeweeene
swswwswswswsweswswswswswneswsw
seseseeseeeneeeewnwnweeewsweese
swswswswswseswsewseeswswswswnwneswswsw
neesewseneswswnwswneswnwswwnwwswswne
swneswnenenenwneenee
neeseewseeeewnweswnweeweewe
seseswseseswswnenwneswsenenewswseesesw
swnwnwenwnwnwswwneswnwnewnwnenwnwswnenwse
nwwswseneneeswneewswwsesesenw
nenenwnwnwswswneenwnwnenwnenwnenwnwsenwne
sewsewnwneseenwseewsesesesesewseesene
seeesenenwseseseseenwseseseweeswsewse
nweenesenwneeeneneeneeeswnenene
ewwwwwewwnwwwwewswswew
seeseswesesesenenwnwswseenwnwsweeswnw
eseswswseneeswnenwwseseseseseseneswsww
sewseseseeesenweenewseeeseswesese
swseseseseneesesesesewseseeweseesese
seseseesesenwsesenwswsesesesesesesesenesw
eweeeneneswswsewsenee
wswwnewwwwsenwwnewswwewwwww
wwwnwwwwwswenewwwwwwnwnwwse
seseswseseseseseseseesesesenwsenwsesese
seseesenwnenwnewswswneesewswsesw
swnwswwwswsweswwe
wwswenewnewnwswweeswwsewnwswww
nwwneswswswswsweswwswswnewswswswswswswsw
wseswnwneswseeseeeeneeeseseeseew
wwwsewwwewwnewwwwnwwwww
wswswswseeswnwswweseseweswswswswne
nwnwnwnwnwnwsenwnenewnwwwnwnwsewnwww
swswseneswswswswswswsewswswswnwnwe
enenwswswseswseseswswswseswswsenenwsw
nwswneswnenwswsenenweeswsesesewseswse
neesewsweswewseswseseseswseswnwnwswsenw
neeneneeneneneneneeseeneneswwwnee
nwswsewnwswswenesenwneneewseweenwnw
nwnwnewwwsewswseeswenwnwnenwnwneenww
wwewwwnwwwwsewwne
seswesenweswswnwswswswneenw
eeeneeenenewneneeneneenee
swswswnwewwnwwwseswswwswewnwwswswsw
wwwnwnwwwnwwesesewwe
swesesesenwsesesesenwseswseswswsese
nwnwsenwsenwenwnwnewnenwnwnwsenenenew
neenwnenesesewnwnewnenewnenenenesenwne
nwnwseneesenwwnwnwnwnwnwnwnesewsenww
swswneswwswswswwnwswsewswwenwseswsw
wswnwsweweswsenwnwnenwwesenwnenesenwe
nenenenenenwnenenewswnenenwneneseneswnee
seseseenwenewsesesesesesesese
newwneenwsweewnesenee
sewnwnewsewnwwnwnwnenwwwnwenwnw
senwwnenwneswnwnwswnenwnwswnwwnenwwnwnw
wwswneswnwnwwwwsenwnwenwenwwnw
eseswnwnwseswweeseswnenesenwsesesenw
swwseeswswwnewwseswswswneswswswnew
seswseswseswswnwnewswseswseswnewswsesw
seseswnwnwneswswenwnwswswswsewwwwsw
wwwwswswnewswnenwwswswnwewseswe
eeneeeneneneeneesw
sewnenwswswswwswswswseeswswswneswswsw
wneneswnenwswseeswnenenenwseneswnewnene
nwnenwnenenesenewneneneneenwne
swsenwsenwseewewswseeswseeseswswsw
seeseneenwseneseseseseswsesesesesesew
wseswswswwnwsweswwwswwwwwwnew
swswswseswneswswseswswswswswsenwseswnese
nwnewsewwnwnesweswewswnwseswe
weneswsweewswsenwnwnwnwsenwnwwwnw
nenenenwwsenenenesenenwnenenene
swwswenwswseswseswswseswseswswneswswsw
nesenenenwsenenenesenenenenenenenwnenenww
nenwnenwnwnwwsenwnwnenenwsenenenwnenenw
seswswneswseseswswseseswseseenwwwswnw
seswseseesenwnesewnwnweseswenwwswe
eneeesenwenwwsweeseeseseseeesenwsw
swswnwswswseseseeswseseseswsweseswnwsese
nesenenenewnenenee
nwnenwenenwnwnwnwnwnenwnwnwneneswnwswnw
nwnesweswnwnewnenesenweneneeeswnene
seseseseseseseneswseswsw
wwnwsenwnwseneswwnewnwswwnwseswwenw
nwnwwewswswnwnwwwnwnwwnwsenwwnwnwnwne
neeneneeeeswsweeeenesweneeene
swswswsewseswswswnenwsewseswswsesesee
nwenenwwneseswneneneenenewswwnesenw
seseseswseeseseeneseesesenewsenesesww
eeeeeseseesenwse
nwnwnwnwwnenwnenesenwnwnenwnwnw
swnwneswsweseswsesenwswswswswswseswseswsw
neenwseseseweseseseeeeeeeeswne
ewseneseweeewsesesewse
senenwswnwnwenwsesenwnwnenwnenwswnenwnwnw
wswswswsweswswseswswwswswwswswnenesw
nwswswnenwenenenwnwnenene
wnewnwswwwneswweewewswwnewsew
eewnesenewneeeneneeeswneneenee
swswswswswswswneswneswneswswswwswneswne
swsenwwwwnwwsenewenenwwnwwnwnwnwnw
swnwnwwwwwwwwwnwwnwnwwe
nweeneseweeswneewneneneneeneeene
neneseneeneneeeenwneeweseneewse
nwswseeswswswsesesenwswseswseseswswsesw
neeneneneneneneesewneswneeweneenenee
wswwswnwwwswswswsesw
eneneeweeeenenenene
wwwnewswwnewwwwsesewwwwenwse
nwnwsewnwnwnwnwnwnw
neswseswswseswswseswswseesenenwnenenwne
nweeweenwneesenwswseswenw
swnewswswswseeneeswnweenenenwnewnwsene
swneneenewnenewnenwswneneswneenenenesw
nwsenwsewnenwsenwnwnenwnwwswswnwnwnwnwnwe
wewnwewwwewwwnwwswwwswswwsw
nwwwwsenwwnenesenewswwswewwswwsw
esweeneeesweeeneseenwneneeneswe
ewswswwswwwswswwwww
wwwsesenenwnwnewwewsewwswweswnew
nwneswnesenwneneesenwnwnenenwnewsenwnw
wsenenwnwnwseewsenwnwenweneswneseswwnw
swswswswseseswsenwsesweseesesesewswsw
eweeseesweneseeseesesesee
nwewseneswsewsenweseeseswsesenenenw
sesenwwswseeeeseeseseswneseseeesese
nenewneneneneneneneneenenwnwnesenenenesw
swseseeseseseseseseseesenwwswneese
seseseseseseseeeeseeseneseeweswnw
nwswwseneenewsesenenenwnenwsenesenwswnwe
nwnenwwsenwswewsenwnwnwnenwnwnwnwnwnwnwnw
sewswsweweswnwwneneswnese
nwswneseswseswseseseseswenwswswswswswswse
newenwnwswnwswnwnwneeswweswnwesenwsw
eenweeeeenwsenweseeeesewse
wseeeswswwwwwswsesenenenwswnwwwenw
eseeneenenweeesweeenwee
seswswswwseesesese
eeseseeeenwswnwseneseweseeeeseesw
seseseeseeneewwseswneseseneneswnwwe
wwwwwwwnewwwwseww
wseenwnwnwwsenwnewnwwwwweewsww
swwenwwwenwnwneseswesewwneswswse
swswnenenenenenenwnene
nwswneswwnwwswwsewsewnenwwwwenenw
nwswseseseeseswnweseswswseswswnwsesew
swnwswswsesenwsweseswsenwne
eneeneeneeeseeneneswswsweneenenewe
wsesweseswnweeeeeeenwesweenwe
nenenwwnweenenewneseneneswnwnenwswne
wwwweswwseswneswswnwwswneseswswswsw
eswenweseeeeeeweseneeneeseseee
seseseswseseneesesenwswsesesesesesesew
swswneseswswswseneswwwsesweseseseswse
weseeeseeeeeseseeneseeenwseswse
eseeneesenesewnesewseseswseseseesew
nwswswseswseseseseswseeeseneswswsewse
wnwnwsenenwnwsesenwwesewnenwseeswenenw
senweeseswwswseseseeneeese
neswseseseseseesesesesesesese
senwenwnwsweeswswseseseseeseneseeewse
eswnwswswseswsweswnwswnwwswnwswswsesw
seweswswsenwsenwseswsenesw
neneeneswnwnenenenwewnwnewneeswnwne
wswswswsenenwnwswswsweswswneneeswsesww
swnwnenwnenwnenenesesenenenenenenenwnene
enesweeenwswswnesweneneeneeeswee
nwnwnwsenwnwnwewnwnwnwnwnwnwneswnwnwnwnw
enwnesesewesenweseeewseenwesee
swsenewenesewwswwwsewnesw
eneeeneeeeeenwwneneeseeeewse
ewseeeenwnesewesweeeeeeseseee
nwwneneseswnenwnwnesesenesenenwnwswnwwne
eenwnwwwsewwwne
swenwnwnwnwnwewnwewnwswnwnwnwnwwnww
seesewseseswnesenwesenweeswswseswne
wwwweneneewseswsenwwswwwwwnew
enwnwnwwewseswwnwwnwnwnwwnwnwwee
enenenenenwnenenwwnwnenenwswneneenenw
eeweseeewseeesesweeenenwenesese
neswnwneneneneeneeeneneeneeneswnene
swwswwswewwswwswswwneswswwswsesw
neswneneseneneneneneneneneneneneswnwnenene
nwwnwnewnenweswnwweswseenwsewwnwse
eseeeweeeseeeenwswesenweeee
seswseseswswneseneseseseseswseseseseenenw
neseewswswweweeewwenwewsenwnw
seswnwseseseeesenwwseseseswnesesesese
swwnwswnwnwnwwnwnwnwenwenwnwnwnwnwnw
eneseneswewneseenwenwnweseneeneenw
swsenwwwseswswnwswswwenwswswsweswsw
neneneneneneenenewneseeneenenwswene
swswswswswswwswswenwwswswswswswswswe
swnwswwnenwswwneeseseswwnenesewsene
neeesweewneenwneseeeeneeenee
wnwwwswnwnewswnwswsewnwnenweeswnew
swneneneneneeneneeeneneeswnenene
weseswseeswewnwwseseese
eesweeseeeseeeenweee
seswswwsewseswneneswwwneswneewneswww
sewseswsewswwswwwwnwnesweswnwneswe
nwnwnenewnwnenwsenenenwneenwnwnesewnene
swnwswnwnwswesenesesesewnwsenwnwneese
wnwnwwnwwnwnwwenwnwnwenwwwnwseew
nesweseswwnwnwnwnwwswswseenenwwsesw
esesenwneneeneneseneeenewewe
wsesweswnwswneswswswwsesenwswneswswsw
eswnenwenenwneeeswewenweneeesw
wneneeneeswneenenenewneneenenenenwnese
wwnwwwsewnwwwwnenewsenwwwww
nwsenwsenwnwnenwnwwnwnwneswneneneenenwnene
wswnweneswswesweeewwnenwnenwnenwne
wewwwwwnwswwnenwnewswwewswnw
swwwnwweeswewswwwwsewwwnwnw
neeneeeenwneneeweneeseee
swenwneeneswneneewneneeneseseeswew
nweeeeeeseeeeeeswesweeene
nwnwenwnwneseneseswnwnewenwswnwenewnw
wsesesesesesesesesesenesesw
wwwwwnewweswswnwwewwewwsww
wnenwnwwwwwwnwnwwnwwnwnwsew
nwnenesenenenenenewneneweneneneenwnesw
esewnesenwneeswenenewswswwnwsesenwnw
eeeeeeeeeseneewswnweeeneswe
neneseseweswwwwswnwwswnwwsweswwww
seswswneswswswnewsweswswswsenenwwwsw
nenenweneneneneneswneneneeene
sewnwseeneseseeswseeenwseseseneseswee
enewneseeeseneeeeeneeeeneenew
esewswenweseenwseeeeeeesenesw
nwnwenwnwnwewnwswnwswseseneewnw
enwnwnenwnwwswnwnwnenwnwnenwnwsenenenw
nwsenwwnwenwenwnwwenwewswwenwww
senwsesesesesesenenwsesenwsenwneseseww
wsenwswseseswewswneseswswswesw
nwwnewwnwsewwwwwwsewwnwwseww
wsenesesenenwneswwseswswswneneswswseswsw
seseseseseseneseenwsesewseseseesesese
neneenenewnenenenenenenewneneenesew
ewwneswswnenenwswnwswseseeswnwesewsw
seswswewneswwnwnwnwswneneeseswnewe
nenwwnwwsenwswnwnwnwwnwwenwnwnwnwnwnw
wwwnwnwseswwnwwnwneeswwnwneswnwnw
swswwwnwnewwwweswswswwwwsewswsw
eeeeswesweeeeenweeenweenee
senwseweswnwnwswnenenwwnwsenwnwnenenw
nwnwwnwnwsesenwnwnwnwnwnwnwneswe
swseeseswseseseswneseswnwnwwseswnwsenw
nwwewewwnenwnweswsesee
swewwwsewwswswwnwwwswswnw
wnwweenewnwnwsweswwewwsewswse
swenesewsesewsesenesesewsenwesesewnw
eseseeeesenwesenweseseseseswswesese
nwnwnwnwnwnwnwnwnwnwsenwnwwnwnwnwnwsesenw
seeseenwnwwseneswseseseseswsesenwsee
swswswsweswwwswswnwswwswswswwswese
wswwwwnewwnwwswswwnwwsewsesewne
swswnwswneswenwswseswseseneseswwesww
swswneswswswswewswnwswww
nwnwnwnwnenwwnwenwnwnwnwnwnwnwnwseesw
swnwseneenenwneneseneneneeeenewnene
neeeeeseneneneneeeswnwneeswenene
enwwnwnwwnenwnwnwenwwnenwneesenwnene
nwwnenwenwewwesenwnwwswnwwsenww
wnwnwnwnwnwwnwnwswwnwenwnw
swwwwnewswnenwswseseswswnewesewne
nenwwnwnwnwnwnwneenwnwsenwnenwnwswnwnenw
neewsweeeeeeneeeeneeswneeee
wwswwwwseswswswwwswwwwnewwe
nwwswseneenesewswneswswneseswswwnesw
eneneneneneneenewnenenene
nwenwneneeeswwneeneswneneneseneeene
nenweeneenwnesewneswswenew
swwwweswnwwsweswswswwswswswwwsw
swswnwnwswswswswswswseswsweswswwswswsw
nesewswswseswseseneseneseseene
newneswwneeneeenenwswseneeenenwene
neneswseenenewneswwnenweenenenenwsene
seneneneseneswnwnenewenenenenwwswnenw
nwnwsenwnwnwnwnwsenesenwenwwnwnwswnewnwnw
seeesenesenwseeswwswnwnwseneseewenw
swswsesesenweseeseswwsesesenesenwsesesw
swswwneneswswswsweswswswswswswswswswswsw
wseseswneseseseseseseswneswesenwsesese
nwenwneeneseswswwnwnwnwnwwsewswnwne
nwnenenwwneseneenwnwnenwnwnenewne
sesenwseswenweeeeesesesesewsesesee
wnwswnenwwwenwwnwnenwwnwwsewwsww
nenenwnwnenwwnenwnenwwsenwnenwnwsenwewse
⛄"""