diff --git a/day22-1.py b/day22-1.py new file mode 100644 index 0000000..0f3fd2c --- /dev/null +++ b/day22-1.py @@ -0,0 +1,107 @@ +import re + +#create a class to store the map +class plan: + def __init__(self): + self.grid = [] + self.goTo = [(0, 1), (1, 0), (0, -1), (-1, 0)] + + def addLine(self, inputLine): + inputLine = inputLine.replace(' ', '+') + self.grid.append(list(inputLine)) + + def testPrint(self): + for line in self.grid: + for point in line: + print(point, end = ' ') + print('\n') + + def setStart(self): + self.direction = 0 + self.column = self.grid[0].index('.') + self.row = 0 + maxL = 0 + for line in self.grid: + if len(line) > maxL: + maxL = len(line) + for i in range(len(self.grid)): + while len(self.grid[i]) < maxL: + self.grid[i].append('+') + + def getInstruction(self, instruction): + if instruction.isnumeric(): + self.move(int(instruction)) + if instruction.isalpha(): + self.turn(instruction) + + def turn(self, direction): + if direction == 'L': + self.direction -= 1 + if self.direction < 0: + self.direction = 3 + elif direction == 'R': + self.direction = (self.direction + 1) % 4 + + def move(self, distance): + for _ in range(distance): + nextRow = self.row + self.goTo[self.direction][0] + nextCol = self.column + self.goTo[self.direction][1] + if nextRow < 0 or nextCol < 0 or nextRow >= len(self.grid) or nextCol >= len(self.grid[nextRow]) or self.grid[nextRow][nextCol] == '+': + nextRow, nextCol = self.wrapAround(nextRow, nextCol) + if self.grid[nextRow][nextCol] == '#': + return + self.column = nextCol + self.row = nextRow + + def wrapAround(self, nextRow, nextCol): + if self.direction == 0: + for i in range(len(self.grid[nextRow])): + if self.grid[nextRow][i] in ['.', '#']: + nextCol = i + break + elif self.direction == 1: + for i in range(len(self.grid)): + if self.grid[i][nextCol] in ['.', '#']: + nextRow = i + break + elif self.direction == 2: + for i in range(len(self.grid[nextRow])-1, 0, -1): + if self.grid[nextRow][i] in ['.', '#']: + nextCol = i + break + elif self.direction == 3: + for i in range(len(self.grid)-1, 0, -1): + if self.grid[i][nextCol] in ['.', '#']: + nextRow = i + break + return nextRow, nextCol + + def getPassword(self): + return (self.column + 1)*4 + (self.row + 1)*1000 + self.direction + + + +#create an object of the map +path = plan() + +# reading input and inserting it into the map +with open('input22.txt','r') as f: + inp = f.read().splitlines(keepends=False) + +for line in inp: + if line == '': + break + path.addLine(line) + +instructionSet = inp[-1] +instructionSet = re.split('(\d+)', instructionSet) + +path.setStart() + +#go through the instructions +for instruction in instructionSet: + path.getInstruction(instruction) + +#path.testPrint() +print(path.column + 1, path.row + 1, path.direction, sep = '---') +print(path.getPassword()) \ No newline at end of file diff --git a/day22-2.py b/day22-2.py new file mode 100644 index 0000000..d15900d --- /dev/null +++ b/day22-2.py @@ -0,0 +1,150 @@ +import re + +#create a class to store the map +class plan: + def __init__(self): + self.grid = [] + self.goTo = [(0, 1), (1, 0), (0, -1), (-1, 0)] + + def addLine(self, inputLine): + inputLine = inputLine.replace(' ', '+') + self.grid.append(list(inputLine)) + + def testPrint(self): + for line in self.grid: + for point in line: + print(point, end = ' ') + print('\n') + + def setStart(self): + self.direction = 0 + self.column = self.grid[0].index('.') + self.row = 0 + maxL = 0 + for line in self.grid: + if len(line) > maxL: + maxL = len(line) + for i in range(len(self.grid)): + while len(self.grid[i]) < maxL: + self.grid[i].append('+') + + def getInstruction(self, instruction): + if instruction.isnumeric(): + self.move(int(instruction)) + if instruction.isalpha(): + self.turn(instruction) + + def turn(self, direction): + if direction == 'L': + self.direction -= 1 + if self.direction < 0: + self.direction = 3 + elif direction == 'R': + self.direction = (self.direction + 1) % 4 + + def move(self, distance): + for _ in range(distance): + directionChange = self.direction + nextRow = self.row + self.goTo[self.direction][0] + nextCol = self.column + self.goTo[self.direction][1] + if nextRow < 0 or nextCol < 0 or nextRow >= len(self.grid) or nextCol >= len(self.grid[nextRow]) or self.grid[nextRow][nextCol] == '+': + nextRow, nextCol, directionChange = self.wrapAround(self.row, self.column) + if self.grid[nextRow][nextCol] == '#': + return + self.direction = directionChange + self.column = nextCol + self.row = nextRow + + def wrapAround(self, nextRow, nextCol): + if self.direction == 0: + if nextRow < 50: + nextCol = 99 + nextRow = 149 - nextRow + directionChange = 2 + elif nextRow < 100: + nextCol = 50 + nextRow + nextRow = 49 + directionChange = 3 + elif nextRow < 150: + nextRow = 149 - nextRow + nextCol = 149 + directionChange = 2 + else: + nextCol = nextRow - 100 + nextRow = 149 + directionChange = 3 + elif self.direction == 1: + if nextCol < 50: + nextCol += 100 + nextRow = 0 + directionChange = 1 + elif nextCol < 100: + nextRow = 100 + nextCol + nextCol = 49 + directionChange = 2 + else: + nextRow = nextCol - 50 + nextCol = 99 + directionChange = 2 + elif self.direction == 2: + if nextRow < 50: + nextCol = 0 + nextRow = 149 - nextRow + directionChange = 0 + elif nextRow < 100: + nextCol = nextRow - 50 + nextRow = 100 + directionChange = 1 + elif nextRow < 150: + nextRow = 49 - (nextRow - 100) + nextCol = 50 + directionChange = 0 + else: + nextCol = nextRow - 100 + nextRow = 0 + directionChange = 1 + elif self.direction == 3: + if nextCol < 50: + nextRow = nextCol + 50 + nextCol = 50 + directionChange = 0 + elif nextCol < 100: + nextRow = nextCol + 100 + nextCol = 0 + directionChange = 0 + else: + nextCol = nextCol - 100 + nextRow = 199 + directionChange = 3 + return nextRow, nextCol, directionChange + + def getPassword(self): + return (self.column + 1)*4 + (self.row + 1)*1000 + self.direction + + + +#create an object of the map +path = plan() + +# reading input and inserting it into the map +with open('input22.txt','r') as f: + inp = f.read().splitlines(keepends=False) + +for line in inp: + if line == '': + break + path.addLine(line) + +instructionSet = inp[-1] +instructionSet = re.split('(\d+)', instructionSet) + +path.setStart() + +#go through the instructions +for instruction in instructionSet: + path.getInstruction(instruction) + + +# print solution +print(path.column + 1, path.row + 1, path.direction, sep = '---') +print(path.getPassword()) \ No newline at end of file diff --git a/in2.txt b/in2.txt index 7993b87..6e06946 100644 --- a/in2.txt +++ b/in2.txt @@ -1,15 +1,14 @@ -root: pppw + sjmn -dbpl: 5 -cczh: sllz + lgvd -zczc: 2 -ptdq: humn - dvpt -dvpt: 3 -lfqf: 4 -humn: 5 -ljgn: 2 -sjmn: drzm * dbpl -sllz: 4 -pppw: cczh / lfqf -lgvd: ljgn * ptdq -drzm: hmdt - zczc -hmdt: 32 \ No newline at end of file + ...# + .#.. + #... + .... +...#.......# +........#... +..#....#.... +..........#. + ...#.... + .....#.. + .#...... + ......#. + +10R5L5R10L4R5L5 \ No newline at end of file diff --git a/input22.txt b/input22.txt new file mode 100644 index 0000000..051d872 --- /dev/null +++ b/input22.txt @@ -0,0 +1,202 @@ + ....#.......##.....#......#...#...#.........#.#...................................#................. + .......#.......#........#............#.......#.....#..............#..............#.................. + ..............#...#.........#................................................#....##..........#..#.. + ..#..#.##.......#..........#....#...##......#............................................#........#. + .......#...............................#.......#.............#................#......#.............. + .............#................................#.........#.........#.#.....#..................#...... + ....#....................#...#......#...##....................................#..#..#.#............. + ...............#...............#..#.#.........#...#.............##.....#............................ + ..##.#....#.....#..#..#....#.........#............#...#.#................................#...#...... + ..........#...#..#.....##.#......#...#.........#.....#........#......................#.#............ + ....#......#............#.#........##......#..................#..................#......#........... + #.......#.............#.......................................#.......#..............##............. + .............#..............#......##.....#...........#...#.....#........#...#..................#... + ..................................#.......................#............#.....#.............#........ + ...............#...........#........#.....#..........##...............#.......#....#................ + ......#............................#............................#...............................#... + ..#...........................##..............#.##...#...........#...................#..#......#.#.# + ....#...#.......#..........................#...........................#.........#....#..#.......... + ......##........................###............#.#................#......................#.......... + ........#.#..........#...#.......................................#...#..............#............... + #...............#.#......#.#................#................................#..........#..#........ + ..................#........................#.....................#................................#. + ......#......................#.......#................................#..#...........#............#. + .....#.#................##..........................#...#..#....#....#....#.......#.#..#......#..... + ...#.....#.......#......#..........................##.#.#......#.#....#....##..#......#..#.......... + ................#..#.......#..............#.............#.#.........#....#....##..#......#.........# + .........###...#..#.#..............#............#..........##........#..#.#.#........#....#......... + ..................#......#........#...........#.#....#.........................#..#........#........ + ............##.#................#...#..................#..........#........#........................ + ..#........##............................#.............................................#............ + ...........#....#..#......................................#.#...#.##.#...........##....#......#..... + ...........#.................##.....#..................#....#....#.......#...#...#.#.........##..... + .....#................#............#...#............#.......#..#.....................#.............. + ...#............#.........................#.....#................#........#.............#..##...#... + ....................#.............#........................#...........#.#....................#..... + ........#........#.#.........#..................#........#........#.#...........#.............#..... + .................................#..#.............#.#...............................#............... + #......#...#..............#..#...#........#.....#.#..#.............................................. + .....##................#......#..........#.......##........#......#...............#.......#....#.... + ........................#.#...#..............#..............#.......#...#...........#............... + ...#.#.#..................#...#..#.#.....##............................#........#..#.#.............. + .......................#........##..........#....#.##...#...#...................#................... + ....#.........#......................#.#..........#...#...................##.........#.............. + ............................#...............................#...#....#....#........#....#..#........ + #..............................#.......................................#....#...................#... + ..................#.#.......#...#....#...#..................#..........#..........................#. + .......#......#........#......#....#.................................................#........##.... + ..#...#.#......#.....................#..#........#...............##............##.............#....# + ......#..#............................................#.................#......#.......#...#..#..... + ........#..#.....................#....#..........#...##.....#...............#......................# + ....#............................#.#.............. + ........#......#.............#..........#......... + .#.#.....................#..........#..#.#......#. + .....................................#............ + ......#.....#...##.........#..................#... + .....#................#.....#.......#............. + ............#..#....#...............###......#.... + ......#........#................#.##....#..#..#... + ..#............#......#..#........................ + .........#...................#..................#. + ..##..............................#....#.......... + .........#........................#............... + .#.................#............#..#.#.....#....#. + ..................##.................#............ + ............#.#..........##.................#..... + .....#.#......#..............................##.#. + ........##..........#..#...#....##.........#....#. + .....#.....#....#.#...#..#.......#..............#. + #..............#.........#........................ + .#.......#.#.#.#..............#...........##...... + ....#..#....#.........#...#..............#........ + ........#...#........#...............#.......#.... + ...#...................................#.......... + .............##..#......#.#...#.#.#............... + ...........#......#....#.....#.................... + ................................#.#....##......... + ...................#.........................#...# + ......#.........................................#. + ....#.................#.#..#.............###...... + .......#...#..#........#....#..........#.#........ + .####..#...#....#.........#.......#.............#. + .#.......#.#...................##....#...........# + ....#.#....##.....##.#............#.............#. + ..................#....###..#...#............#.... + ..........#.................................#..... + ..#..............#...............#........#.#...#. + .#.....#...#......#.................#.........#..# + .....#....#.#..#...#.#........#..#...............# + ............#............................#.#...... + ......#.........#.......................#......... + ..........#........#.......................#...... + .............#.................#...........#...... + .......#...........#..#..#....#.............#..#.. + .#....................#......#...........#........ + ........#...#.#........#..........#............... + ...................#..#.................#......... + .....#.#..#...#........#....#.........##..###..... + ...........##.....#.........##......#............. + .............#..........#....#.......#.#......#... + ...............#.........#........................ +#...............................#......................#..............#...#.....#.#............#.... +#................#......#...........#...#.................#.#...##.........#.....#...#............#. +....................#......#..#......##.#...#....................................#.....#.........#.. +.............#..#.....#..##..#.........#........#.........................................###.....#. +#.......................#.##.......#............#...........##.......#.................#........#... +...............#....#......#.......#..#....#.....#.....................#.......#.................... +.......##................#....#........#..#..#........#.............#............................... +#.....#.................#........#............##.............#..............#...#......#..........#. +..#.......#......#.#........#....#.........................#.#.....#......#.............#...#....... +.........#..#...........................#......................##...............#...#.....#..#.....# +...#..#...#...##.#......#..#.......#...#....#....#.......................#.........#............#.#. +.#......................#...#................#.#........................#..........#.#.....#.....#.. +............................#...#..........#.......#.....#............#.....#...#...#..#..#......... +..#..........#..........#..#.#..##.....................#.......#.....................#.......#...... +...#...#.........................#......#.#...............#.........#........................##..... +..............#......#...................#..#..................................#.....###.........#.. +.#.#.........#..#........#..........#.........................#....#...........#.#.......#........#. +#..........#............................................#..............##...#...........#........... +....#.#..................#.#.#.............#.#...#.......#....#....................................# +#..#.........#.......................................#.......................#...................#.# +...............#.....#..............#...##...........#..........#.....................#............. +...#...#.................#.#......#.#....#...............#.............................#.....#...... +............#...#...#.....#.....#...................#..#..............#..............#.............. +...............................#........#..............#...#...#........#.#..........##...#..#..#... +........#.............#..........#..............#.......#..............................#............ +..........#..#.................................#..............#.#....###..#..#....#.........#....... +.....................#....#............#....................#.........#...#...#....#........#......# +.#.#.#..........##...........................#.#.............#..............#.................#..... +..........#........................#...................................#.......#....#.........#..... +...................#...#..#........#.#.#.........#................#..#.#.............#.............. +..#........#.......#...............#.......#...#......#..........#.....#............#............... +........#..#.................#..#.#......#......#...#...........#.......#..#.....................#.. +.....................#.....#...........#......#...........#..#...#.....#......#................#.... +..........#......#.#..#.#..........................#..............#.........#.#................#..#. +............#...............................#....#.....................#.....#.......#....##.......# +................................#.............#...................#.....#..#...#.......#............ +...........#..........#.#......#......#.#..#.........#..........#..#.#........#.......#......#.....# +..#.............................#..#......#.......#.#.#........#.................................... +......................................#.........#............#.........#.........#...............##. +........#............#............#.#...#.#........##......#...#........#........#................#. +...................#....................#.........#....#..#.........#.....#........#.......#........ +.#....#....#...........................#......#.........................#.....#.......#............. +...#..............................#........#.................#........#...........................#. +#.......#....#........#......#...#....#......................#..............................#....... +........##......#.......#....................#....................#.#.#................#..#.......#. +..........#............#............#.......................#..#..#...........#.......#.#........#.. +#.....................................#.#............#.........#.......#.....##..................##. +..........#..............#..#......#.................##..................#..................#..#.... +....#..............#.#.......#.........#.........................#..................#....#...#...... +............................................#..#..#..#........#.........#.#......#.......#.....#.... +....####.....#..............#......#.....#.....#.. +....#....#.................#..#.......##.......... +.##.......#......#..........#.#.....#............. +#........#...........#..........#..............##. +......##......##......##....#......#.............# +#................#...............#..#............. +.................#.....................#..#....... +.....#.#.....#................#....#.............. +#.##......#..##.........#.........#...#........... +...##..#.........#......#.........##.............. +.#......#......#......#..................#........ +...#....##..#......#.................#...........# +................................##.....#..#....#.. +#............#....#.......#.............#...#....# +..........#....................................... +.....#..............................#.....#...#.#. +........#.........#...##..#...............#....... +#........#.#..............#..#.......#..........#. +...#...............#....#...##.............#...... +#...........#............................#........ +......##...#.........#....#.....##..#...........#. +...#.#..#................#....................#..# +.....#....###........#.......#......#.......#..... +............................#.#.........#......... +......#.#.........#...#............#......#..#.... +......#..#.#...#.................##............#.. +...#....#.................#............##....#.... +........#........................................# +..#.............#.##.............................. +.#..............#..................#......#..#.... +.#..#.............##...........##.........##...... +..#....##...............#............#....##...... +........................#......................... +............#...................#................. +.#..........#..........#..........#.#............. +........#.#................................#...#.. +..........#......#........#.....#.#..#....##...#.. +...........#.#..........................#....##... +...............................#...#.#............ +.#.............#.................#.#.......#..#..# +....#................#...#............#........... +.........#...##......#..#......................... +...#.#....#.........................#.#........... +....#......##......##.....##..................#... +.#.......#.......#..#.......##....#.........#..#.# +..#...##.................#........................ +.#.#..#.................#....#................#... +.....#...................#............#.......##.. +.#...#......#.#...#..........#..........#...#.#... +..#.......#..#.#......#..........#.....#.........# + +9R30L4R39R30R41L20L17R49L35L4L43L47R15L18L7L28L21R24R3L1L46L15R4R25R7R38R7L6L3R48R16R25R16R11L50L27R11R38R20L1L41R44L13L28R37L23R16R35R47R42L4R27L47R29R44L49R31R21R15L22R17L13R24R50L29R32R11L21L40R34R43R30R23L31L42L48R33R14L32L12R10R37R3R39R26R36R15L3R14L2R6L41L8R27L12R9R29R45R39L28R23L40R2L14R34R12L25L25L34L37L45R1L18L23L35R7R14L9L1R22R16L4R11L7L6R24L19R2R13R47L6L32L44L47R2L37R6L44R31R10R42R19R8L44R1L44R49L34L19L42L12R14L8R42L19R44R6L45L7R40R32L11L2L39L11R2L10R48R14L32L24R7R16R49R9R30L20R46R25L7L20L49L1R27R33R11R2R35L8L22R35L37L4L11R17R38L49R15R30L38R43L29L44L17L26L14R2L43R46L3R7R17R19L35R6L28L43L49L1L20R26L25L48L26R48L6R25R16R13R41L41R25R30R49L46R32L8R3L46L27L47L6L1L35R4L20R40L50L33R1L26R2R4L15L25L20R31R34L40L1R9R7R8L5R9L39R8R7L47L20R22R14R39R19R32R7R30R41L7L43L2L3L16R15R49L20L48L5L23L24R29R7R25R18L40R12L21L22L50L26L8R11L40L14R2L42L16L4L7L47L21L42L16R25L12R7R22R14L18L29R20R20L39R43L30L11R26L44R38R42R7R1L36L3L31R20R3R44L39R42R3R22L40L3R38R28L47R37R45L15R5R18R21R9L36R37R34L35R20R47R49L30R32R12R24R6L35L17L39R45R10R8R11R12L16L41R18L29L40R26L21R39L35R38R30L25R6R21L7R33R49R18R8R25R42R30R28R24R11L15R33L30L14L3R24L18R3R36L4R39R14L34R12L26R14L38R9R3R25R29L13L41L26L14R44L16L41R34R16L37R4L34L1L4R31R46L29R4L31R3R50L50L11L37R34R17R48R40L47L4L29R6L11L1L29R27R34R42R48L9L5L37R28R13R30L29L26R40L6R6L39L20R2R46L37L24R15L3L32L47R47R49L6L34L8R32L44L22L39L48R40L36L35R29R9L16R11R10L39R1L45L22L22R25L37L21R5R1R9L34L50L21L17L14L2L11R33L16R17L33R3L20R8R15L33L47L43L20L45L47R46L1R25L45R43R16L17L7R49R15R29L33R40R10L29L44L28R6R24R50R20L29L12R13L24L36R9L28L14L44R6R7R29L18L1R26R4R25L8R23R49L33L41R38L17R45L39R17L44L13L19R2L32R35L18R8R18R16R50R5L28R9L16R43L9L7R10R34L30L43R7R27L12L38R21L39L11L2R20R38L44R28R18L39R25L21R24R21L28R5R36L6R4R50R33L44L41L25R35R41R19L16R35R36R28L35R19R41R20R21L4L29L10L33L7L9L23L49L32L30R49R42L9L17L32L45L5L31L24L27R34L9R48L2R41R10R27L20R44R33L19L38L45R40L26R41L38R42R13R36L6L9R50L41L19R11R44R2R31L27R23R16L26R1R50R35R21R40L4L15L7R18R41R35R33R22L4R11L25R13L30L30L41L34R9L17L13R37R42L15L40L33L46R9L50R45R43R8L41L11R4R11R26R15L8L45L30R12R28R18L8R8L41L43R1L38L4R49L8R19L46L25R27L19R47R21R26L12L33L16R39R15L24R22R43R10R37L26L15L28L47L36L19L20R3R4R19L45R15R32R7L25L48L1R4L29L32R2R34L11R21L11L18L38R21L11R7L31R1R43R40L28R1L40L21R38R29L17R3L50L45L13R40R37L32L28L18R43L25L41R3L43R25R20R22L48R38R15L17L27R4L12R50R37R37L16L1R16L14R40R13L20L49L23R13R46L7R9R22R9L10R35R17L18R14L25L12L4R40R46L28L17L20L16L16L23R7L28R29R40R28R16L43L12R26L29R23R1R49R31R17R32L19R16R29L33L11R9R4R27R13R44R19L46R41R16R32L2R15L10R32R19R19R29R25L43R24L49R26L23R10L43L1L27L43L42R34R20R44R6R32R27R23L47L24L5R44R44R18R42R34R11L27R29R29L8L32R27L12L24L30L32L33R43R36R33L6L6L19L42R25R24R4R50R44R25R24L15L12R42R44R38L30L3L16L29R24R9L7L31R2R13L44R36L39L35R20L47R41R42L5L20L34L25R43L32L41L23R6R23L27L27L10L45R6R10R46L30R33R47R46L29L49R38L38L34L19R38R30L7L43R17R20R3R13R14R20R20L21R18R30L7L15L5R43L25L50R34L33R34L2R45L47L34R3L48L17L26L40R19R19L50R25L11L25R17L28L48R10L3L44R39L9R49L13R12L3R8L2L11L42L29L10R49R20L34R26R48R12L47R13L29L32L28R34L28L2R19L42R5R13R3L44R50R2L16R41R4L3L10R30R17L35L4R50R49R9R39L22L34R27R46R29L9R34R34L43R10R9R11R48R11R29R35R21R43L22L8L45L19L42R22L18R43L32R22L16R19L31R47L34R46L50R48R48L49L46L42L38L17L45R23R19L36L2L23L33R47R4L12R41R48L49L5L22L26R31R1L10L14L21R17R43L30R32L11R11R23L44L13L32L15R25L2L15R47L23L34L15L44L34R27R33R18L42R48R30L3L38R21R5R31R43R9L38L15L20L6R4R23R31L10L36R36R26R20L5L28L49R18R45R5R44L42R37R37R49R43R43L14L24R26L28R36L15L29R50R49L6R3R43L14L3R23L36L39L34R41L6L10L29R20R38L34R18L36R18L6L36R17L11R33L22R3L46L48L42R49R37L5R46R26R18L48R45L14R46R41L13L48L26R15L50R42R38R22R11R32R41L35L5L29R36R45L6R18L22R40L16R25R46R36R25R17R48R42L31R18R13R10R31L36L25R7L36L29R34L19L26L19R35R33R3R30R39L49R24L12R33L2L27R38L26L10L2L9R1R18L33R10R37R16L1L21L39L18R21L12L33L18L13R37L16R48L38L37R35R16L43R14R44R12R32L46R13R42L5R20R27R3R4R29L6L49R33L49L13L20R24R12L44L44L21R17R27R29L15L14R21R13L7L11L4L24R48L40R16L46R47R49L1L50R13R25R41R49R1R36R47R24R42R14R31L18L18R45R38L47L29R19L30R38L14L40L44L18L42R26R28L1R47R45R27R7L45R7L4L45L19L50R11R32R4R41R19L20L21L27R9L29R23R17R47R15L42R31R49L12R47R9R41R24L19R32L14L14L18R12R19R11R31R23L10R10R41L3R24L26R41R25L15R2R8L48L31R9L2R21L33R36R33L44R27R10L21L48L2L50L7R32R6R31L17R16L27L10R9L3R35L49R37L4R33R3R46L16R10R44R44L27L31R18L43R48L29R31R17R46R6R4R35R2R24R31L3R47R13R22R37R5L13L49L36L35R46R1L44R28L30R42R31L30R1R32R42L25R18L2R4L8R27L45L19L9L35R15L44R36L1L23R28L12L6R2R12L17L2R29R11L14R19R18R19R26L44R15L27R4L10L3L47L23L17L19R42L3L16L23L12L8L27L50L27R17R19L29R31R14L40L31R32L40L16L42R7L36R27R34L47R40R46L22L26L26L15R46R20L25R2R49L48R11R14R25L50L1R50R45R7L44R32R21L43L46R10R11R46R30L30L30R44L24L34L3L6R48R34L38R50L1L25L13R28L45R23R4L26L10L45R14L20R42R27L2L34R44L41L33R7L11L45R10R49L11L6R8L1L31L27L25R1R44R23L11R42L4L7L27L50R29R1R17L46L28R19L5L50L26L16R27R20L17L44R17R40L5L34L47L23L6L48R46R39R17R14L14R31R34R39R42L4L31L46L38L3L39L21L27L16L34L33R32R15R29R8L46R19L10R10R12L22R29R40R50L42R15L28L33R45R45L42L29R30R31L23L5R2L26L1R47R17R49L25R29L38R45L16L37R44R44R39L32L1L36L23R13R49L3R49R3L3L44L41L47L28L4R39R48L21R13L36R44R40R35R8R28R15R17R50L19R31L11R46R32R44R3R8L11L3R19R29R22L24R28R18R40L7L19R27R20L32R14R23L30L40R47R48R14L42R49L13R29R11R42R40L12R50L30L8L16L19R44L4L1R16R36R39L1L50R30L19L27L49L17L3L47L1L8L37R8L28R7R4L29R5L42L47L33L32R19R28L44L11L23R32L39L29R18R35R9L50R35R31R25L25R33L1R26R22L37L31L39R5R45L11R45L9L4L2R22L31R38R1R22L26R13R33R44R21L15L1R15R45L41R18L24L32R48L27L8R14R1L7R32L50R38R14R18L42L36R3R29L40L24L3R12R1L30R2L28L34R49R5R3R25R1R28L10R33L48L36L27R5L22R21R1R20L33R50L17R10L43L30R8L42R17L14R7L22R20L29R12L37L30R13L3R1L1R28L28R29L48R6L8L9L50R39R13L45L8L45L6L20R33L24R5L7L47R6L27 \ No newline at end of file