diff --git a/2024/src/main/kotlin/Direction.kt b/2024/src/main/kotlin/Direction.kt index 23425d6..3a0d199 100644 --- a/2024/src/main/kotlin/Direction.kt +++ b/2024/src/main/kotlin/Direction.kt @@ -18,4 +18,9 @@ fun Grid.Coordinate.step(direction: Direction, steps: Int = 1) = Direction.East -> copy(x = x + steps) Direction.South -> copy(y = y + steps) Direction.West -> copy(x = x - steps) - } \ No newline at end of file + } + +fun Grid.Coordinate.neighbors(distance: Int = 1): Sequence = + Direction.entries + .asSequence() + .map { step(it, distance) } diff --git a/2024/src/main/kotlin/day20.kt b/2024/src/main/kotlin/day20.kt new file mode 100644 index 0000000..7c9504a --- /dev/null +++ b/2024/src/main/kotlin/day20.kt @@ -0,0 +1,58 @@ +fun main() { + val maze = CharGrid.read("day20-sample.txt") + val start = maze.find('S') ?: error("No start position") + val end = maze.find('E') ?: error("No end position") + + val paths = maze.findPaths(start, end) + + val total = paths.first { !it.cheated }.time + println("Time without cheating: $total") + val part1 = paths.count { it.time <= total - 100 } + println("Part 1: $part1") + + paths.sortedBy { it.time } + .groupBy { it.time } + .forEach { (time, list) -> + val saving = total - time + println("${list.count()} x $saving") + } +} + +data class MazeResult(val time: Int, val cheated: Boolean) + +fun CharGrid.findPaths( + position: Grid.Coordinate, + goal: Grid.Coordinate, + visited: Set = emptySet(), + time: Int = 0, + cheated: Boolean = false +): List { + if (position == goal) { + return listOf(MazeResult(time, cheated)) + } + + val newVisited = visited + position + + fun canVisit(position: Grid.Coordinate): Boolean = + position in this && position !in newVisited && this[position] != '#' + + val paths = position.neighbors() + .filter { canVisit(it) } + .fold(mutableListOf()) { list, next -> + list.addAll(findPaths(next, goal, newVisited, time + 1, cheated)) + list + } + + return if (cheated) { + paths + } else { + position.neighbors() + .filter { it in this && this[it] == '#' } + .flatMap { it.neighbors() } + .filter { canVisit(it) } + .fold(paths) { list, next -> + list.addAll(findPaths(next, goal, newVisited, time + 2, true)) + list + } + } +} diff --git a/2024/src/main/resources/day20-sample.txt b/2024/src/main/resources/day20-sample.txt new file mode 100644 index 0000000..f107d40 --- /dev/null +++ b/2024/src/main/resources/day20-sample.txt @@ -0,0 +1,15 @@ +############### +#...#...#.....# +#.#.#.#.#.###.# +#S#...#.#.#...# +#######.#.#.### +#######.#.#...# +#######.#.###.# +###..E#...#...# +###.#######.### +#...###...#...# +#.#####.#.###.# +#.#...#.#.#...# +#.#.#.#.#.#.### +#...#...#...### +############### \ No newline at end of file diff --git a/2024/src/main/resources/day20.txt b/2024/src/main/resources/day20.txt new file mode 100644 index 0000000..880bf86 --- /dev/null +++ b/2024/src/main/resources/day20.txt @@ -0,0 +1,141 @@ +############################################################################################################################################# +#.....#...#...........#.........###...###.............#...#...#.......#...#.....#...#...#...###...#####.....#.......#.............###...#...# +#.###.#.#.#.#########.#.#######.###.#.###.###########.#.#.#.#.#.#####.#.#.#.###.#.#.#.#.#.#.###.#.#####.###.#.#####.#.###########.###.#.#.#.# +#.#...#.#.#.........#.#...#...#.....#.#...#.........#.#.#...#.#.#.....#.#...#...#.#...#.#.#.#...#...#...#...#.....#.#...#.........#...#...#.# +#.#.###.#.#########.#.###.#.#.#######.#.###.#######.#.#.#####.#.#.#####.#####.###.#####.#.#.#.#####.#.###.#######.#.###.#.#########.#######.# +#.#.#...#.#...#.....#.###...#.......#.#...#...#...#...#.....#.#.#.#...#.#.....###.....#...#.#.#.....#...#.###.....#.....#...........#.....#.# +#.#.#.###.#.#.#.#####.#############.#.###.###.#.#.#########.#.#.#.#.#.#.#.###########.#####.#.#.#######.#.###.#######################.###.#.# +#.#.#...#.#.#.#...#...#...#.........#.#...#...#.#.#...#...#.#...#...#.#.#...#...#...#.#.....#.#.###...#.#...#.....#...#...............###.#.# +#.#.###.#.#.#.###.#.###.#.#.#########.#.###.###.#.#.#.#.#.#.#########.#.###.#.#.#.#.#.#.#####.#.###.#.#.###.#####.#.#.#.#################.#.# +#.#.#...#...#.....#...#.#.#.........#.#.#...###.#...#...#.#...#.......#.#...#.#.#.#.#.#.#.....#.#...#.#...#...#...#.#...#...#...#.......#...# +#.#.#.###############.#.#.#########.#.#.#.#####.#########.###.#.#######.#.###.#.#.#.#.#.#.#####.#.###.###.###.#.###.#####.#.#.#.#.#####.##### +#.#.#.....#.........#.#.#...........#...#.#...#...#.....#.###.#.#...#...#...#.#.#.#.#.#.#.....#.#.#...#...#...#...#.......#...#...#.....#...# +#.#.#####.#.#######.#.#.#################.#.#.###.#.###.#.###.#.#.#.#.#####.#.#.#.#.#.#.#####.#.#.#.###.###.#####.#################.#####.#.# +#.#...###...###.....#.#.........#.....#...#.#.###...#...#...#.#...#.#...#...#.#...#...#.#.....#...#...#...#...###.#...........#.....###...#.# +#.###.#########.#####.#########.#.###.#.###.#.#######.#####.#.#####.###.#.###.#########.#.###########.###.###.###.#.#########.#.#######.###.# +#.#...#...#...#.....#.###...#...#.#...#...#.#.#.....#...#...#...#...#...#...#...#.......#.#...#...#...###...#.....#.........#.#.#.....#.#...# +#.#.###.#.#.#.#####.#.###.#.#.###.#.#####.#.#.#.###.###.#.#####.#.###.#####.###.#.#######.#.#.#.#.#.#######.###############.#.#.#.###.#.#.### +#.#...#.#.#.#.......#...#.#.#.#...#...#...#.#.#...#.#...#.#...#.#.....#...#.#...#.......#.#.#...#.#.#...#...#...............#...#.#...#.#...# +#.###.#.#.#.###########.#.#.#.#.#####.#.###.#.###.#.#.###.#.#.#.#######.#.#.#.#########.#.#.#####.#.#.#.#.###.###################.#.###.###.# +#...#...#.#.#.....#.....#.#.#...#...#.#...#.#...#.#.#...#.#.#.#.#.......#...#...#.......#...#...#.#.#.#.#...#.............#...#...#...#.#...# +###.#####.#.#.###.#.#####.#.#####.#.#.###.#.###.#.#.###.#.#.#.#.#.#############.#.###########.#.#.#.#.#.###.#############.#.#.#.#####.#.#.### +#...#.....#...#...#.....#.#...#...#...#...#...#.#.#...#.#...#...#.....#.....#...#.#...#...#...#...#.#.#.#...#.......#...#.#.#...#.....#.#.### +#.###.#########.#######.#.###.#.#######.#####.#.#.###.#.#############.#.###.#.###.#.#.#.#.#.#######.#.#.#.###.#####.#.#.#.#.#####.#####.#.### +#...#.....###...#.......#...#.#.....#...#...#.#.#.#...#.......#.......#...#.#.#...#.#.#.#.#.....#...#.#.#...#.....#...#.#.#.#.....#...#.#...# +###.#####.###.###.#########.#.#####.#.###.#.#.#.#.#.#########.#.#########.#.#.#.###.#.#.#.#####.#.###.#.###.#####.#####.#.#.#.#####.#.#.###.# +#...#...#...#...#.#.....#...#.#...#.#...#.#.#.#.#.#...#.......#.....###...#.#.#...#.#...#.#...#.#.#...#.....#.....#...#...#.#.......#...#...# +#.###.#.###.###.#.#.###.#.###.#.#.#.###.#.#.#.#.#.###.#.###########.###.###.#.###.#.#####.#.#.#.#.#.#########.#####.#.#####.#############.### +#.#...#...#.....#.#...#.#...#...#...#...#.#.#.#...#...#...........#...#...#.#.#...#.#...#...#...#.#...#.......#...#.#.#...#...#...........### +#.#.#####.#######.###.#.###.#########.###.#.#.#####.#############.###.###.#.#.#.###.#.#.#########.###.#.#######.#.#.#.#.#.###.#.############# +#.#.#####...#...#...#.#.###.........#.###.#...#.....###...#...###...#.#...#...#...#.#.#.#.....#...#...#.....###.#.#.#.#.#.....#.......#...### +#.#.#######.#.#.###.#.#.###########.#.###.#####.#######.#.#.#.#####.#.#.#########.#.#.#.#.###.#.###.#######.###.#.#.#.#.#############.#.#.### +#.#...#...#...#...#.#.#...#...#.....#...#.....#...#...#.#.#.#.#...#.#.#...#...#...#...#...#...#.#...#.......#...#...#.#.#...........#...#...# +#.###.#.#.#######.#.#.###.#.#.#.#######.#####.###.#.#.#.#.#.#.#.#.#.#.###.#.#.#.###########.###.#.###.#######.#######.#.#.#########.#######.# +#.....#.#.........#...#...#.#.#.....#...#...#.#...#.#.#.#.#.#.#.#.#.#.###.#.#...#...###...#.#...#...#.###...#.#.....#...#.........#.#.......# +#######.###############.###.#.#####.#.###.#.#.#.###.#.#.#.#.#.#.#.#.#.###.#.#####.#.###.#.#.#.#####.#.###.#.#.#.###.#############.#.#.####### +###...#.......#...#...#.....#.....#.#.....#...#.#...#.#.#.#.#.#.#.#.#.#...#.#.....#...#.#.#.#.#...#.#.#...#...#...#.......#.......#...#...### +###.#.#######.#.#.#.#.###########.#.###########.#.###.#.#.#.#.#.#.#.#.#.###.#.#######.#.#.#.#.#.#.#.#.#.#########.#######.#.###########.#.### +#...#...#...#...#...#...#...#...#.#.........#...#...#...#.#.#.#.#.#.#...#...#.......#.#.#.#.#.#.#.#.#...#.........#.....#.#...#...#.....#...# +#.#####.#.#.###########.#.#.#.#.#.#########.#.#####.#####.#.#.#.#.#.#####.#########.#.#.#.#.#.#.#.#.#####.#########.###.#.###.#.#.#.#######.# +#.#...#...#.............#.#...#.#.......#...#...#...#.....#.#...#.#.....#...#...#...#.#.#.#.#.#.#.#...#...#...###...#...#...#...#...#...#...# +#.#.#.###################.#####.#######.#.#####.#.###.#####.#####.#####.###.#.#.#.###.#.#.#.#.#.#.###.#.###.#.###.###.#####.#########.#.#.### +#.#.#.#...#...............#...#.......#.#...###.#...#...#...#...#.#.....###...#.#.#...#.#.#.#.#.#.#...#.....#...#.#...#...#.........#.#...### +#.#.#.#.#.#.###############.#.#######.#.###.###.###.###.#.###.#.#.#.###########.#.#.###.#.#.#.#.#.#.###########.#.#.###.#.#########.#.####### +#...#...#...###...#.......#.#.........#...#...#.#...###.#.#...#...#.........#...#.#.#...#...#.#.#.#.#.........#...#.#...#.....#...#...#...### +###############.#.#.#####.#.#############.###.#.#.#####.#.#.###############.#.###.#.#.#######.#.#.#.#.#######.#####.#.#######.#.#.#####.#.### +#...............#.#.....#.#.........#...#.....#.#.#...#...#.#.....#...#.....#.#...#.#.#.......#.#...#.....###.....#...#.......#.#.......#...# +#.###############.#####.#.#########.#.#.#######.#.#.#.#####.#.###.#.#.#.#####.#.###.#.#.#######.#########.#######.#####.#######.###########.# +#.....#.....#...#.....#.#.###.......#.#.###...#...#.#...#...#...#.#.#.#.....#.#.###.#.#.#.....#.#.......#.......#...#...#...#...#...........# +#####.#.###.#.#.#####.#.#.###.#######.#.###.#.#####.###.#.#####.#.#.#.#####.#.#.###.#.#.#.###.#.#.#####.#######.###.#.###.#.#.###.########### +#.....#.###...#.#...#...#.....#.......#.....#.......#...#...#...#.#.#...#...#.#...#...#...###.#.#.....#.#...#...#...#...#.#...#...#...#...### +#.#####.#######.#.#.###########.#####################.#####.#.###.#.###.#.###.###.###########.#.#####.#.#.#.#.###.#####.#.#####.###.#.#.#.### +#.....#.#.......#.#.............###...#...#...#.......#.....#...#.#...#.#...#...#...#...#...#...#.....#...#...###.....#...#...#.....#...#...# +#####.#.#.#######.#################.#.#.#.#.#.#.#######.#######.#.###.#.###.###.###.#.#.#.#.#####.###################.#####.#.#############.# +#...#.#.#.........#...#.............#...#...#.#.......#.....#...#.#...#.#...###.#...#.#...#.#...#.........#.........#...#...#...#.......#...# +#.#.#.#.###########.#.#.#####################.#######.#####.#.###.#.###.#.#####.#.###.#####.#.#.#########.#.#######.###.#.#####.#.#####.#.### +#.#.#...#.....#.....#...#...................#.........#.....#.###.#...#...#...#...###.....#...#.#.......#...#.......###...#...#...#...#...### +#.#.#####.###.#.#########.#################.###########.#####.###.###.#####.#.###########.#####.#.#####.#####.#############.#.#####.#.####### +#.#.#...#...#.#...........#.................#.......###.....#...#...#.......#.#...###...#.#.....#...#...#.....#...#.....#...#...#...#.......# +#.#.#.#.###.#.#############.#################.#####.#######.###.###.#########.#.#.###.#.#.#.#######.#.###.#####.#.#.###.#.#####.#.#########.# +#.#...#.#...#...###...#...#...................#...#.......#.#...###.#.....#...#.#.#...#...#.....#...#.....#.....#...#...#.#.....#.#.........# +#.#####.#.#####.###.#.#.#.#####################.#.#######.#.#.#####.#.###.#.###.#.#.###########.#.#########.#########.###.#.#####.#.######### +#.....#.#.#...#.#...#...#.........#.....#...#...#.....#...#.#...#...#...#.#...#.#...#.........#.#...#.......#.........#...#.#...#.#.###.....# +#####.#.#.#.#.#.#.###############.#.###.#.#.#.#######.#.###.###.#.#####.#.###.#.#####.#######.#.###.#.#######.#########.###.#.#.#.#.###.###.# +#.....#.#...#.#...#.............#...###.#.#.#.......#.#.#...#...#.......#.#...#.#.....#...#...#.....#.#.....#.#...#...#...#...#...#...#.#...# +#.#####.#####.#####.###########.#######.#.#.#######.#.#.#.###.###########.#.###.#.#####.#.#.#########.#.###.#.#.#.#.#.###.###########.#.#.### +#.#...#.......#...#.#.....#.....#.....#.#.#.#...#...#...#.....###...#...#...###...#.....#...#...#...#.#...#.#...#...#.....#...#.....#...#...# +#.#.#.#########.#.#.#.###.#.#####.###.#.#.#.#.#.#.###############.#.#.#.###########.#########.#.#.#.#.###.#.###############.#.#.###.#######.# +#.#.#...#.....#.#...#...#.#...#...#...#...#...#.#.................#...#...#...#.....#...#...#.#.#.#.#...#.#.......#.......#.#...###.#.......# +#.#.###.#.###.#.#######.#.###.#.###.###########.#########################.#.#.#.#####.#.#.#.#.#.#.#.###.#.#######.#.#####.#.#######.#.####### +#.#.###...###...###...#.#.....#...#.......#...#.......#.....#.....#.......#.#.#.....#.#...#.#.#...#.....#.......#.#.....#.#.......#.#.......# +#.#.###############.#.#.#########.#######.#.#.#######.#.###.#.###.#.#######.#.#####.#.#####.#.#################.#.#####.#.#######.#.#######.# +#...#.......#...#...#...#.....#...#.......#.#.#...###.#...#.#...#...###...#.#.#...#...#.....#.#...#.............#...#...#.........#.#.......# +#####.#####.#.#.#.#######.###.#.###.#######.#.#.#.###.###.#.###.#######.#.#.#.#.#.#####.#####.#.#.#.###############.#.#############.#.####### +#...#.....#.#.#.#...#.....#...#...#.#.......#...#...#.#...#...#.#...#...#...#...#.....#.......#.#.#...............#.#.....#...#.....#...#...# +#.#.#####.#.#.#.###.#.#####.#####.#.#.#############.#.#.#####.#.#.#.#.###############.#########.#.###############.#.#####.#.#.#.#######.#.#.# +#.#.......#...#.....#.....#.....#.#...#.............#.#.#...#.#...#.#S###############.#...#.....#.................#.......#.#.#...#.....#.#.# +#.#######################.#####.#.#####.#############.#.#.#.#.#####.#################.#.#.#.###############################.#.###.#.#####.#.# +#.............#...#...#...#...#...#...#.............#.#.#.#.#.......#################...#...#.....#...........#.............#...#.#.......#.# +#############.#.#.#.#.#.###.#.#####.#.#############.#.#.#.#.#################################.###.#.#########.#.###############.#.#########.# +#...........#.#.#.#.#...#...#.......#.....#.........#...#.#.#...#.....#######################E###...###.....#...#.....#...#.....#...........# +#.#########.#.#.#.#.#####.###############.#.#############.#.#.#.#.###.#################################.###.#####.###.#.#.#.################# +#.#...#...#.#...#...#...#...............#.#.......#...#...#...#.#.#...#########################...#...#...#.......###...#...#...............# +#.#.#.#.#.#.#########.#.###############.#.#######.#.#.#.#######.#.#.###########################.#.#.#.###.###################.#############.# +#...#...#.#...........#.....#...........#.........#.#.#...#.....#.#...#################.........#...#...#.................###.#.............# +#########.#################.#.#####################.#.###.#.#####.###.#################.###############.#################.###.#.############# +#.........#.....#.........#.#.......#...###...#...#.#...#.#.#...#.#...#...###.....#####.............#...#...#.............#...#.............# +#.#########.###.#.#######.#.#######.#.#.###.#.#.#.#.###.#.#.#.#.#.#.###.#.###.###.#################.#.###.#.#.#############.###############.# +#.#...#...#.###...###.....#.........#.#.....#...#...#...#.#...#...#.#...#.#...#...#.................#.....#.#.#...###.....#...#.....#.......# +#.#.#.#.#.#.#########.###############.###############.###.#########.#.###.#.###.###.#######################.#.#.#.###.###.###.#.###.#.####### +#...#...#...#...#...#.........#.......#...............#...#.........#...#.#.#...###...#.............#.....#...#.#.....#...#...#...#...#.....# +#############.#.#.#.#########.#.#######.###############.###.###########.#.#.#.#######.#.###########.#.###.#####.#######.###.#####.#####.###.# +#...#.........#.#.#.#.......#...#.......#...#...#...###...#...#...#.....#...#.....###...#...#.......#.#...#.....#.....#.....#...#.......#...# +#.#.#.#########.#.#.#.#####.#####.#######.#.#.#.#.#.#####.###.#.#.#.#############.#######.#.#.#######.#.###.#####.###.#######.#.#########.### +#.#.#.........#...#.#.#...#...###...#.....#...#...#.....#.#...#.#.#...#.....#.....#.....#.#.#.........#.....#...#...#.#...#...#.#.........### +#.#.#########.#####.#.#.#.###.#####.#.#################.#.#.###.#.###.#.###.#.#####.###.#.#.#################.#.###.#.#.#.#.###.#.########### +#.#.#...#...#...#...#...#...#.#...#.#...#...#.....#...#.#.#...#.#...#.#...#...#...#.#...#.#.#.....#...#.......#.....#...#.#...#.#...........# +#.#.#.#.#.#.###.#.#########.#.#.#.#.###.#.#.#.###.#.#.#.#.###.#.###.#.###.#####.#.#.#.###.#.#.###.#.#.#.#################.###.#.###########.# +#.#...#...#.....#...........#...#.#.....#.#.#...#...#.#.#.#...#...#.#.#...###...#.#.#.#...#.#.#...#.#.#.................#...#.#.#.......#...# +#.###############################.#######.#.###.#####.#.#.#.#####.#.#.#.#####.###.#.#.#.###.#.#.###.#.#################.###.#.#.#.#####.#.### +#.#.............#...............#.#...#...#.....#...#...#.#.#...#.#...#...#...#...#.#.#...#.#.#.#...#...#...#.....#...#...#...#.#.###...#...# +#.#.###########.#.#############.#.#.#.#.#########.#.#####.#.#.#.#.#######.#.###.###.#.###.#.#.#.#.#####.#.#.#.###.#.#.###.#####.#.###.#####.# +#.#...#.........#...#...........#...#...#...#...#.#...#...#.#.#.#.#.......#...#.#...#.#...#.#.#.#.....#.#.#...###.#.#.....#.....#...#.#.....# +#.###.#.###########.#.###################.#.#.#.#.###.#.###.#.#.#.#.#########.#.#.###.#.###.#.#.#####.#.#.#######.#.#######.#######.#.#.##### +#.#...#.....#...#...#.......#...#...#...#.#.#.#.#.#...#...#.#.#.#.#.#...#####.#.#...#.#...#.#.#.#...#.#.#.......#...#...###.....#...#.#...### +#.#.#######.#.#.#.#########.#.#.#.#.#.#.#.#.#.#.#.#.#####.#.#.#.#.#.#.#.#####.#.###.#.###.#.#.#.#.#.#.#.#######.#####.#.#######.#.###.###.### +#...#.......#.#.#.#.........#.#...#.#.#.#.#.#.#...#...#...#.#.#.#.#.#.#...#...#...#.#...#.#.#.#.#.#.#.#...#...#.......#...#...#...###...#...# +#####.#######.#.#.#.#########.#####.#.#.#.#.#.#######.#.###.#.#.#.#.#.###.#.#####.#.###.#.#.#.#.#.#.#.###.#.#.###########.#.#.#########.###.# +#.....#.......#...#...#...#...#.....#.#.#.#.#...#####.#...#.#.#.#.#.#...#.#...###.#.###.#.#.#.#.#.#...#...#.#...#...#...#...#.#...#...#.....# +#.#####.#############.#.#.#.###.#####.#.#.#.###.#####.###.#.#.#.#.#.###.#.###.###.#.###.#.#.#.#.#.#####.###.###.#.#.#.#.#####.#.#.#.#.####### +#.......#.............#.#...###.....#.#.#.#...#...#...#...#.#.#.#.#...#.#...#...#.#...#.#.#.#.#.#.....#...#...#...#...#...#...#.#...#.......# +#########.#############.###########.#.#.#.###.###.#.###.###.#.#.#.###.#.###.###.#.###.#.#.#.#.#.#####.###.###.###########.#.###.###########.# +#.....###.#...........#.#...###.....#.#.#.#...#...#...#.#...#.#.#.#...#...#.#...#.#...#.#.#...#.#...#...#...#...........#.#.....#...#.......# +#.###.###.#.#########.#.#.#.###.#####.#.#.#.###.#####.#.#.###.#.#.#.#####.#.#.###.#.###.#.#####.#.#.###.###.###########.#.#######.#.#.####### +#...#.....#.#.........#...#...#.....#.#...#...#.....#...#...#.#.#.#.#...#.#.#.###.#.#...#.....#...#.#...#...#...#.....#.#...#...#.#.#...#...# +###.#######.#.###############.#####.#.#######.#####.#######.#.#.#.#.#.#.#.#.#.###.#.#.#######.#####.#.###.###.#.#.###.#.###.#.#.#.#.###.#.#.# +###.....#...#.#...#...#...#...#.....#.###.....#.....#.......#.#...#.#.#.#.#.#...#.#.#...#.....#.....#.###.#...#.#...#...###...#...#...#...#.# +#######.#.###.#.#.#.#.#.#.#.###.#####.###.#####.#####.#######.#####.#.#.#.#.###.#.#.###.#.#####.#####.###.#.###.###.#################.#####.# +#.......#.#...#.#...#.#.#...###.......#...#...#...#...#.....#.....#.#.#.#.#...#.#.#.#...#.....#.....#.#...#...#...#.....#.......#.....#...#.# +#.#######.#.###.#####.#.###############.###.#.###.#.###.###.#####.#.#.#.#.###.#.#.#.#.#######.#####.#.#.#####.###.#####.#.#####.#.#####.#.#.# +#.#...#...#.#...#.....#...#.............#...#.#...#...#.#...#...#.#.#.#.#...#.#.#.#.#...#.....###...#.#.#...#.#...#...#...#...#.#...#...#.#.# +#.#.#.#.###.#.###.#######.#.#############.###.#.#####.#.#.###.#.#.#.#.#.###.#.#.#.#.###.#.#######.###.#.#.#.#.#.###.#.#####.#.#.###.#.###.#.# +#...#...#...#.###.....#...#...#...#.....#...#...#...#.#.#...#.#...#.#.#.....#.#.#.#...#.#.#...#...#...#.#.#...#...#.#.......#.#...#.#...#...# +#########.###.#######.#.#####.#.#.#.###.###.#####.#.#.#.###.#.#####.#.#######.#.#.###.#.#.#.#.#.###.###.#.#######.#.#########.###.#.###.##### +###...#...#...#.......#...#...#.#.#...#.#...###...#...#.#...#...#...#.....#...#.#.#...#...#.#...#...#...#...#.....#.........#.#...#...#.#...# +###.#.#.###.###.#########.#.###.#.###.#.#.#####.#######.#.#####.#.#######.#.###.#.#.#######.#####.###.#####.#.#############.#.#.#####.#.#.#.# +#...#...#...#...#.....#...#...#.#...#.#...#.....#...#...#.#...#.#.#...#...#.#...#.#.#.......#...#...#.#...#.#.....#...#...#.#...#...#...#.#.# +#.#######.###.###.###.#.#####.#.###.#.#####.#####.#.#.###.#.#.#.#.#.#.#.###.#.###.#.#.#######.#.###.#.#.#.#.#####.#.#.#.#.#.#####.#.#####.#.# +#.#.....#.###.#...#...#.#...#.#...#.#.....#.#...#.#.#...#...#.#.#.#.#...###.#...#.#.#...#.....#.#...#.#.#.#...###...#.#.#...###...#...#...#.# +#.#.###.#.###.#.###.###.#.#.#.###.#.#####.#.#.#.#.#.###.#####.#.#.#.#######.###.#.#.###.#.#####.#.###.#.#.###.#######.#.#######.#####.#.###.# +#.#.#...#.#...#...#...#.#.#...#...#...#...#...#.#.#.#...#...#...#.#.......#.#...#...#...#.#...#.#...#.#.#...#.#.......#.#...#...#...#...#...# +#.#.#.###.#.#####.###.#.#.#####.#####.#.#######.#.#.#.###.#.#####.#######.#.#.#######.###.#.#.#.###.#.#.###.#.#.#######.#.#.#.###.#.#####.### +#...#.....#.#...#...#...#.....#...#...#.....#...#.#.#.....#...#...#...#...#...###...#...#.#.#...#...#...###...#.......#...#...#...#...#...### +###########.#.#.###.#########.###.#.#######.#.###.#.#########.#.###.#.#.#########.#.###.#.#.#####.###################.#########.#####.#.##### +#...........#.#.#...###...#...#...#...#.....#.....#.#.......#.#...#.#...#.......#.#...#...#.....#.............###.....#.....#...#...#...#...# +#.###########.#.#.#####.#.#.###.#####.#.###########.#.#####.#.###.#.#####.#####.#.###.#########.#############.###.#####.###.#.###.#.#####.#.# +#.#.....#.....#...###...#...#...#...#...###.........#...###.#...#.#.......#...#.#...#.#.........#...#.........#...#...#...#.#.###.#.#...#.#.# +#.#.###.#.###########.#######.###.#.#######.###########.###.###.#.#########.#.#.###.#.#.#########.#.#.#########.###.#.###.#.#.###.#.#.#.#.#.# +#.#.#...#...#.........#.....#.....#.......#...#...#...#.#...#...#...#...#...#.#.#...#...#...#...#.#.#.........#...#.#.#...#.#.....#...#...#.# +#.#.#.#####.#.#########.###.#############.###.#.#.#.#.#.#.###.#####.#.#.#.###.#.#.#######.#.#.#.#.#.#########.###.#.#.#.###.###############.# +#...#.......#...........###...............###...#...#...#.....#####...#...###...#.........#...#...#...........###...#...###.................# +############################################################################################################################################# \ No newline at end of file