Upload files to "/"

This commit is contained in:
red 2023-12-03 03:57:45 -06:00
parent 6c1f70106b
commit 02370afca8
3 changed files with 648 additions and 0 deletions

119
day3-1.py Normal file
View File

@ -0,0 +1,119 @@
import time
valid_symbols = "#$%&*+-/=@"#"/,!@#$%^&*()_-+={}[]"
w,h = (140,140)
with open("input_day3.txt") as file:
lines = [line.rstrip() for line in file]
matrix = [[0 for x in range(w)] for y in range(h)]
for y in range(h):
for x in range(w):
matrix[y][x] = lines[y][x]
class number:
def __init__(self,x,y,length=1,num=0):
self.x = x
self.y = y
self.length = length
self.number = num
def append(self,num=0):
self.length+=1
self.number = int( f"{self.number}{num}" )
def is_valid(num:number) -> bool:
#but first check if number is valid
result = False
for offset in range(num.length):
x = num.x+offset
y = num.y
check_upperleft = True
check_upper = True
check_upperright = True
check_midleft = True
check_midright = True
check_lowerleft = True
check_lower = True
check_lowerright = True
#if on first y dont check above
if num.y == 0:
check_upperleft,check_upper,check_upperright = (False,False,False)
#if on last y dont check below
if num.y == h-1:
check_lowerleft,check_lower,check_lowerright = (False,False,False)
# if on left or right horizontal edge
if x == 0:
check_midleft = False
if x >= w-1:
check_midright = False
check_upperright = False
check_lowerright = False
#now do comparison
if check_upperleft:
if is_symbol(str(matrix[y-1][x-1])):
return True
if check_upper:
if is_symbol(str(matrix[y-1][x])):
return True
if check_upperright:
if is_symbol(str(matrix[y-1][x+1])):
return True
if check_midleft:
if is_symbol(str(matrix[y][x-1])):
return True
if check_midright:
if is_symbol(str(matrix[y][x+1])):
return True
if check_lowerleft:
if is_symbol(str(matrix[y+1][x-1])):
return True
if check_lower:
if is_symbol(str(matrix[y+1][x])):
return True
if check_lowerright:
if is_symbol(str(matrix[y+1][x+1])):
return True
return False
def is_symbol(c):
if c in valid_symbols:
return True
return False
numbers = []
#140x140 matrix
y=-1
#look at every element in matrix for a number
for line in lines:
#start new line
y+=1
is_on_number = False
for x in range(w):
c = line[x]
if c.isnumeric():
if not is_on_number:
#start a new number record
is_on_number = True
new_num = number(x,y,num=int(c))
elif x == w-1:
new_num.append(c)
if is_valid(new_num):
numbers.append(new_num)
print(new_num.number)
is_on_number = False
else:
#append to existing number
new_num.append(c)
else:
#not a number anymore so finish the number and add to num list if number is valid
if is_on_number:
if is_valid(new_num):
numbers.append(new_num)
#print(new_num.number)
#time.sleep(0.1)
is_on_number = False
sum = 0
for num in numbers:
sum+=int(num.number)
print(sum)

389
day3-2.py Normal file
View File

@ -0,0 +1,389 @@
import time
valid_symbols = "#$%&*+-/=@"#"/,!@#$%^&*()_-+={}[]"
w,h = (140,140)
with open("input_day3.txt") as file:
lines = [line.rstrip() for line in file]
matrix = [[0 for x in range(w)] for y in range(h)]
for y in range(h):
for x in range(w):
matrix[y][x] = lines[y][x]
class number:
def __init__(self,x,y,length=1,num=0):
self.x = x
self.y = y
self.length = length
self.number = num
def append(self,num=0):
self.length+=1
self.number = int( f"{self.number}{num}" )
def is_valid(num:number) -> bool:
#but first check if number is valid
result = False
for offset in range(num.length):
x = num.x+offset
y = num.y
check_upperleft = True
check_upper = True
check_upperright = True
check_midleft = True
check_midright = True
check_lowerleft = True
check_lower = True
check_lowerright = True
#if on first y dont check above
if num.y == 0:
check_upperleft,check_upper,check_upperright = (False,False,False)
#if on last y dont check below
if num.y == h-1:
check_lowerleft,check_lower,check_lowerright = (False,False,False)
# if on left or right horizontal edge
if x == 0:
check_midleft = False
if x >= w-1:
check_midright = False
check_upperright = False
check_lowerright = False
#now do comparison
if check_upperleft:
if is_symbol(str(matrix[y-1][x-1])):
return True
if check_upper:
if is_symbol(str(matrix[y-1][x])):
return True
if check_upperright:
if is_symbol(str(matrix[y-1][x+1])):
return True
if check_midleft:
if is_symbol(str(matrix[y][x-1])):
return True
if check_midright:
if is_symbol(str(matrix[y][x+1])):
return True
if check_lowerleft:
if is_symbol(str(matrix[y+1][x-1])):
return True
if check_lower:
if is_symbol(str(matrix[y+1][x])):
return True
if check_lowerright:
if is_symbol(str(matrix[y+1][x+1])):
return True
return False
def is_symbol(c):
if c in valid_symbols:
return True
return False
numbers = []
#140x140 matrix
y=-1
#look at every element in matrix for a number
for line in lines:
#start new line
y+=1
is_on_number = False
for x in range(w):
c = line[x]
if c.isnumeric():
if not is_on_number:
#start a new number record
is_on_number = True
new_num = number(x,y,num=int(c))
elif x == w-1:
new_num.append(c)
if is_valid(new_num):
numbers.append(new_num)
print(new_num.number)
is_on_number = False
else:
#append to existing number
new_num.append(c)
else:
#not a number anymore so finish the number and add to num list if number is valid
if is_on_number:
if is_valid(new_num):
numbers.append(new_num)
#print(new_num.number)
#time.sleep(0.1)
is_on_number = False
def check_gear_ratio(x,y):
check_upperleft = True
check_upper = True
check_upperright = True
check_midleft = True
check_midright = True
check_lowerleft = True
check_lower = True
check_lowerright = True
#if on first y dont check above
if y == 0:
check_upperleft,check_upper,check_upperright = (False,False,False)
#if on last y dont check below
if y == h-1:
check_lowerleft,check_lower,check_lowerright = (False,False,False)
# if on left or right horizontal edge
if x == 0:
check_midleft = False
check_upperleft = False
check_lowerleft = False
if x >= w-1:
check_midright = False
check_upperright = False
check_lowerright = False
num_0 = False
num_1 = False
num_2 = False
num_3 = False
num_4 = False
num_5 = False
num_6 = False
num_7 = False
total_nums = 0
nums0=None
nums1=None
if check_upperleft:
if str(matrix[y-1][x-1]).isnumeric():
num_0 = True
total_nums+=1
if check_upper:
if str(matrix[y-1][x]).isnumeric():
num_1 = True
if not num_0:
total_nums+=1
if check_upperright:
if str(matrix[y-1][x+1]).isnumeric():
num_2 = True
if not num_1:
total_nums+=1
if check_midleft:
if str(matrix[y][x-1]).isnumeric():
num_3 = True
total_nums+=1
if check_midright:
if str(matrix[y][x+1]).isnumeric():
num_4 = True
total_nums+=1
if check_lowerleft:
if str(matrix[y+1][x-1]).isnumeric():
num_5 = True
total_nums+=1
if check_lower:
if str(matrix[y+1][x]).isnumeric():
num_6 = True
if not num_5:
total_nums+=1
if check_lowerright:
if str(matrix[y+1][x+1]).isnumeric():
num_7 = True
if not num_6:
total_nums+=1
if total_nums==2:
if num_0:
if num_1:
if num_2:
#three-digit string
nums0 = f"{matrix[y-1][x-1]}{matrix[y-1][x]}{matrix[y-1][x+1]}"
else: #if num_0, num_1, NOT num_2
if str(matrix[y-1][x-2]).isnumeric():
nums0 = f"{matrix[y-1][x-2]}{matrix[y-1][x-1]}{matrix[y-1][x]}"
else: #if num_0, NOT num_1
#num_0 is true so number is ends on top-left corner
if str(matrix[y-1][x-2]).isnumeric():
if str(matrix[y-1][x-3]).isnumeric():
nums0 = f"{matrix[y-1][x-3]}{matrix[y-1][x-2]}{matrix[y-1][x-1]}"
else:
nums0 = f"{matrix[y-1][x-2]}{matrix[y-1][x-1]}"
else:
nums0 = f"{matrix[y-1][x-1]}"
#check num_2
if num_2:
if str(matrix[y-1][x+2]).isnumeric():
if str(matrix[y-1][x+3]).isnumeric():
nums1 = f"{matrix[y-1][x+1]}{matrix[y-1][x+2]}{matrix[y-1][x+3]}"
else:
nums1 = f"{matrix[y-1][x+1]}{matrix[y-1][x+2]}"
else:
nums1 = f"{matrix[y-1][x+1]}"
else: #if NOT num_0
if num_1: #NOt num_0, num_1
if num_2: #NOT num_0, num_1, num_2
#num 1 and num 2 are numbers so maybe the next digit is too
if str(matrix[y-1][x+2]).isnumeric():
nums0 = f"{matrix[y-1][x]}{matrix[y-1][x+1]}{str(matrix[y-1][x+2])}"
else:
nums0 = f"{matrix[y-1][x]}{matrix[y-1][x+1]}"
else: #if NOT num 0, num 1, NOT num_2
nums0 = f"{matrix[y-1][x]}"
else: #if NOT num0, NOT num_1
if num_2: #if NOT num0, NOT num_1, num_2
if str(matrix[y-1][x+2]).isnumeric():
if str(matrix[y-1][x+3]).isnumeric():
nums0 = f"{matrix[y-1][x+1]}{matrix[y-1][x+2]}{matrix[y-1][x+3]}"
else:
nums0 = f"{matrix[y-1][x+1]}{matrix[y-1][x+2]}"
else:
nums0 = f"{matrix[y-1][x+1]}"
else: #if NOT num0, NOT num_1, NOT num_2
pass
if not nums1 is None:
return int(nums0)*int(nums1)
if num_3:
if str(matrix[y][x-2]).isnumeric():
if str(matrix[y][x-3]).isnumeric():
if nums0 is None:
nums0 = f"{matrix[y][x-3]}{matrix[y][x-2]}{matrix[y][x-1]}"
else:
nums1 = f"{matrix[y][x-3]}{matrix[y][x-2]}{matrix[y][x-1]}"
else:
if nums0 is None:
nums0 = f"{matrix[y][x-2]}{matrix[y][x-1]}"
else:
nums1 = f"{matrix[y][x-2]}{matrix[y][x-1]}"
else:
if nums0 is None:
nums0 = f"{matrix[y][x-1]}"
else:
nums1 = f"{matrix[y][x-1]}"
if not nums1 is None:
return int(nums0)*int(nums1)
if num_4:
if str(matrix[y][x+2]).isnumeric():
if str(matrix[y][x+3]).isnumeric():
if nums0 is None:
nums0 = f"{matrix[y][x+1]}{matrix[y][x+2]}{matrix[y][x+3]}"
else:
nums1 = f"{matrix[y][x+1]}{matrix[y][x+2]}{matrix[y][x+3]}"
else:
if nums0 is None:
nums0 = f"{matrix[y][x+1]}{matrix[y][x+2]}"
else:
nums1 = f"{matrix[y][x+1]}{matrix[y][x+2]}"
else:
if nums0 is None:
nums0 = f"{matrix[y][x+1]}"
else:
nums1 = f"{matrix[y][x+1]}"
if not nums1 is None:
return int(nums0)*int(nums1)
if num_5:
if num_6:
if num_7:
#three-digit string
if nums0 is None:
nums0 = f"{matrix[y+1][x-1]}{matrix[y+1][x]}{matrix[y+1][x+1]}"
else:
nums1 = f"{matrix[y+1][x-1]}{matrix[y+1][x]}{matrix[y+1][x+1]}"
else: #if num_0, num_1, NOT num_2
if str(matrix[y+1][x-2]).isnumeric():
if nums0 is None:
nums0 = f"{matrix[y+1][x-2]}{matrix[y+1][x-1]}{matrix[y+1][x]}"
else:
nums1 = f"{matrix[y+1][x-2]}{matrix[y+1][x-1]}{matrix[y+1][x]}"
else: #if num_0, NOT num_1
#num_0 is true so number is ends on top-left corner
if str(matrix[y+1][x-2]).isnumeric():
if str(matrix[y+1][x-3]).isnumeric():
if nums0 is None:
nums0 = f"{matrix[y+1][x-3]}{matrix[y+1][x-2]}{matrix[y+1][x-1]}"
else:
nums1 = f"{matrix[y+1][x-3]}{matrix[y+1][x-2]}{matrix[y+1][x-1]}"
else:
if nums0 is None:
nums0 = f"{matrix[y+1][x-2]}{matrix[y+1][x-1]}"
else:
nums1 = f"{matrix[y+1][x-2]}{matrix[y+1][x-1]}"
else:
if nums0 is None:
nums0 = f"{matrix[y+1][x-1]}"
else:
nums1 = f"{matrix[y+1][x-1]}"
#check num_2
if num_7:
if str(matrix[y+1][x+2]).isnumeric():
if str(matrix[y+1][x+3]).isnumeric():
nums1 = f"{matrix[y+1][x+1]}{matrix[y+1][x+2]}{matrix[y+1][x+3]}"
else:
nums1 = f"{matrix[y+1][x+1]}{matrix[y+1][x+2]}"
else:
nums1 = f"{matrix[y+1][x+1]}"
else: #if NOT num_0
if num_6: #NOt num_0, num_1
if num_7: #NOT num_0, num_1, num_2
#num 1 and num 2 are numbers so maybe the next digit is too
if str(matrix[y+1][x+2]).isnumeric():
if nums0 is None:
nums0 = f"{matrix[y+1][x]}{matrix[y+1][x+1]}{str(matrix[y+1][x+2])}"
else:
nums1 = f"{matrix[y+1][x]}{matrix[y+1][x+1]}{str(matrix[y+1][x+2])}"
else:
if nums0 is None:
nums0 = f"{matrix[y+1][x]}{matrix[y+1][x+1]}"
else:
nums1 = f"{matrix[y+1][x]}{matrix[y+1][x+1]}"
else: #if NOT num 0, num 1, NOT num_2
if nums0 is None:
nums0 = f"{matrix[y+1][x]}"
else:
nums1 = f"{matrix[y+1][x]}"
else: #if NOT num0, NOT num_1
if num_7: #if NOT num0, NOT num_1, num_2
if str(matrix[y+1][x+2]).isnumeric():
if str(matrix[y+1][x+3]).isnumeric():
if nums0 is None:
nums0 = f"{matrix[y+1][x+1]}{matrix[y+1][x+2]}{matrix[y+1][x+3]}"
else:
nums1 = f"{matrix[y+1][x+1]}{matrix[y+1][x+2]}{matrix[y+1][x+3]}"
else:
if nums0 is None:
nums0 = f"{matrix[y+1][x+1]}{matrix[y+1][x+2]}"
else:
nums1 = f"{matrix[y+1][x+1]}{matrix[y+1][x+2]}"
else:
if nums0 is None:
nums0 = f"{matrix[y+1][x+1]}"
else:
nums1 = f"{matrix[y+1][x+1]}"
else: #if NOT num0, NOT num_1, NOT num_2
pass
if not nums1 is None:
print(f"y {nums0} {nums1} {y}")
return int(nums0)*int(nums1)
return -1
sum = 0
for y in range(h):
for x in range(w):
c = matrix[y][x]
if c == '*':
#check all 8 directions for part numbers
#since we are an asterisk, we don't have to check if numbers in range are valid since they automatically are :3
gear_ratio = check_gear_ratio(x,y)
if not gear_ratio == -1:
sum+=int(gear_ratio)
print(sum)

140
input_day3.txt Normal file
View File

@ -0,0 +1,140 @@
...........................................751........501...................................890.231...............829..168......143.........
......................................*.........841....*....../................+..311.......................441..........*...........202....
.........332...60....537..697.......901.................609....678....261.....90................870....519...........272..449.......%.......
840.........*...........*....*..968......273...440.415..................*..................&......*...*......447................883...&.....
.....34....651.786...646...804.*..........*.../.....-..........=...............94......96..760.222.....637.%...&.290...55..368.....*..565...
.518*..........+................717......80.............231.....610...810*942..........*...................640...*................499.......
...................189......................772.........*........................550..626...676-......213......432...........790.......834..
......995..=..........&..955...........391......387...825..362........481...334..*................579.*...84%.......506./...................
........*.700..............*..........*.......+..*............*...170.%..........733........658..*....832............-..777..616.915........
......322...........977.526............852...410.14.........28.....$.........831.....%.....@.....586.........69.....................+.......
...............................30.........................*............./.....*.......505....274...........=.#....344...52.308..............
.........123*504.................-...-..................15.968.....427.439...456..............*..935../..441......*.....*..*.....195.794....
..729.............186...............786..476*168.653*.............*........................148...+...962...................271......*.......
............23.......................................435.491*4..40...-...26.......11..133..................*758.-....215....................
466...656..=............957.........463.............................372..*..............................894.....661.......903.......%283....
..................421...*.................32..946...%....668.886..........30.682......108...........................292..................189
....759......379.*.....380.......................-..942..=....*...891......../.......*....193.......703..946/......./...................*...
.39*.........*...847............80-..........................886.*.....+.............418.@......763............432.....................873..
...........916.......................335..369.....................651..624.445*809.........*695...*..267.......+....666.641.888.480.........
...@38...............685..149..........&.*..........312..................................27......544....*.420.........*....*..........*750..
................&.....*..*...............208...........*...361.....&.....569................*986.....295...*..751..499.............549......
.....@.......626...390..761....*.............$.........319....+.289..250*................189.....947......804....*......742*................
.....660....................342.582.......24..611..................................354.*............*.............997.......595....874......
...................................................109.........*...108.........252.*...168.@88...973................................#...$...
214.....161..............499-.......................%........497...*....419.....*...52.........................83.........*5.............739
.......*...............................156..........................88........798..............204...............*.....444.......974........
.108..39..................*651.395#.....*.............963.......911...............886.................532.....417...................-.......
....*..........921*82..321...........597...@321..409.....*254....../........237...*.......................&......./...................=308..
.954..110........................................../.................478....*.....423.........990....187.429..#...506..........614*.........
........#...211.............................575.....................*....893...13.........811*................673.....85...........465......
..................393...........782.............-166.........=.831...401........*.348....................477...........*.819..#261..........
.....761..........*...536.....+....&.................549..427.....*...........924.@......283.50............*........795...=.................
....*....-.51....617./......954...................................248...................*........776....407.................................
.756..986..............326........516............387..342....336............142=.823..354....233.............$...........523........336.....
..........+495...856.....*....363....*188.177.4..+..............*....=512....................*...835......458..348..........*.......=....445
................*.........638.$..............*.......214.........190......293...........&.128......*............*..167......711.........*...
...565.......842.................#.....................@...............=..#...........195.......984.....201#...530...................640....
...*...........................289.401.......251...626..........198*..277....$..............%.......................719..........964........
...397..910+............................$....*.....&.....936..............893../...........249.....#334.299.../503..........*....*..........
..............................918-...420...405..............$...226.729.........910........................*.........892....76....511.......
...674=...282*418......#................................................962..........=693.....760..........499.908/..../.......$........*926
.......................906..../......485*..........*......9....+....564*.........132.............*..........................137.............
...........................300...........960....503.572......490............608*.......*....504.979..25......230.................925...@....
..673............787..............................................433*164.......961.956.596.........*...610...............340.......#...765.
....*....................8*............217*805..................*..................................427..*........680*.......................
....247..............699...848....................651........137.870.673............696..................660.........432...593=.........906.
..........209.........*....................327............................%..........%................3.....................................
.....%.../.....482...708...782............*..........520..................947....390...420.....%..............456.....667*544............732
..305.......%.....*......%....%....220...419....608..*.............282............&....#........269......117-....*834.........546#..........
............137...145.128...........%.............*.555.............*.......................=...............................................
....988.299.....................940.......978..971........437.......79..........*.........238.497...490.912.539.........85......157-........
..........*.660....335......../...%........................*..224........@...556.368.............*...*...*..*...551......................474
291..217..1..................321......-...................17.....*.......810............411......573.688...273.....*....$.............../...
....*.........=.......701............781...*....................761...........315........*........................895.445...................
...............467.......*...............444................................/../..........925..530+....50.....-.............................
........+..........545....970........./........767......543..............953........389.................$.....393......#....17....83........
.668.....577...&..@............803.....931......*............829..226*.............*.......-....114................=..9.....&............298
..../........239.......101...&...*..................419.....@.........922..17......598....704..*..................722...........768.........
.................776..*......156.163............419...@....................*...................465..+....................206=......-.*......
....506.891-.......=.499....................@......#..........992..664....270......*395..............519.......666..............37...566....
....&........251.................671.=.......474......429....*..../.............776.........#.............260.&....319......410*............
............*.....46...772.........#.441.........340=..-.....393.....452..../..............219......487..*........*.....697.................
......993.507.............*.........................................&......515.231..#988........./..$...519.=...435.....*...........753.....
..177..=.......*17.........341..62.....361...820.....647+.........................*...........939...........980.......7.145....310....*.....
....*.....113.....................*17.....*..................583....585...........160..571............................*..............75.....
..937.163....*857...........322.......233..436..973................*............................678..................304.....#140...........
.........*............@................@.......@......412..521......917......+.............................................@..............32
.........233.........5.......649.230..................*...%..................513....304.........745...85..31....799........958..............
.....983........@...............*.....#......%.....340..........=....745...............*565........%..*..........*.....835.........../503...
.....*.......558....71.............518......546..........148..439....*.......567......................870..846$.519.......#..../17..........
....945..381.......$........671@.....................390...........870..........+..%.........*..198..................347-...............164.
....................................................@.....-...............318......555....234.9................@..................134.......
..............489$....=608.............................&...40.*.................................................291.274...489.690*..........
.....=485...........................633.462....+......490......370...............-......740..........416*..............*....................
....................................*.....*.....125./.....#656.....679.....227....455.-....*.......*.................414................552.
.................227..............733.$....787.......532..............*879...-........681...148.188.426./.......547.........=.......645.....
....+..21.....75...*.....797...........73...................491...12............27......................727...@...*........912..............
...258...*572.....955.......*..&...585.........*.......800.*...............@...-............................357.........................+...
...........................415.389.*........973.738.%..-...759.968....477..192.......553...#.......398..170......900..../..986..834$..758...
.........10......816..676..........356..............78............*..%..............*.....372......./......*..........322...................
.....122*..........*......%............590.............870..920..911............246..452................740...............199...............
...........444.....738....505...@.498...*...=..........*...................................946...................+.*......*.................
.....675.....*................180...%.957..335.295...&.222....-..........281..625....@....=.....695...........173..652......141...-.........
.......*....860........842.........................453.......809.....167....*..*..308..........*......902.101..................+...894..130.
.....834...............*....=138.........................224.....301...$..663.9.......58.....899.........*..................................
........................948......................908............+...............#................74........384.454......69.....*724.........
...............4............84........990.949...*...................480...961..230......18........#..367......*.............................
......496.......*289..........*11............*..........139*129....@.........*........................*...255................532.....607.443
......*................888....................812....................876..364......965....105.....446.612...*..12*............*......*......
..374...833.........19*.......904.........432.......153.....78/...............267..........*..............800......285......890...618.......
...*......*...479..........*.*.................648.....+.........71...........*........53..216.686............3/....@..498...............346
.739......28.....*760....112.725..145......133.../.#71.....737....$..*.....407..228......=........%....................=.............407*...
.....619............................=.........&.............../.....932........&.............................296.........348.+166...........
.......*.............22...-917......................................................-317........................=.........#........=.....111
.......263...............................$........829......=...418-...........$..............599..304.............@..........849$..442..&...
..792%...........*880....499...........719....415*.......853................928...47...*59...@...*....679.......744.........................
.........590..589..........*...90...................*...............#282.........*..............568..$..........................736..383.321
.........../.........481....87.*.................831.674....430.............270..393....................%65......................*......*...
....864.........809....*........922.979......................./....461.545.....@.....738........-.....................355.....646...........
.......%......@....#....539.........$.................*122............*....992...898*.....801.497.......#...&...@.................214..862..
.............393...............................964.953..........503@......*........................764..143.17..385...........525...*.......
.......87.49......444#....................&............................108.....801..............*.....&................866.......$.334...626
............*120.............736.971....595........715...462...=.....-........=.................754.............@.........*629..............
.....331............620........*...*.........252.............987.=...846..........163..941.............-219...719...231*..........=.........
....../.........468*..........734...939.........+..220..934......170........745..-.................*....................635......650........
.550.......&..........................................%.*.....................*.......&.........261.346.237..................#..............
...*.528..303.546..........357.....878.....571..........755...619...661.....803.358.335....67.......................496...259.........25....
.938.+....................*...........+.......*649.............*..../.....................*..........................*..........961....*....
...........975........-....745...........312................134...........253.98...........362.......716.............94.+...620...+.-...62..
............*.......123..............429....*26.......590............836&.@...........$..............=..................485.........821.....
....555......924...........287........../.............*............................837..........408.........................................
........265............924*.........784......382......354.............255..280.896...............+..........537....936....524...601.........
.............495........................177.....+...........148...628*......*............691.........776=..*......*......*.......&..........
.....617....*....................832.....#........278*651...*...............767.......16.......66..........857.956.....145..............817.
.......*...560..........906..........635..........................526*.............44*...%....@......@981......................=...624.*....
....446............-.../................*....................%........798...............796.....................448..........839...*....941.
.................523.......%.990..828-.537......22........771....251...........938..884........782....866..................@........776.....
.808...255..............527..$..............&......709*.............*....=....*........+.......*.........*..........908..659.675............
..........=.-694.................225........603........523.......617...201.....85..............430.......982...62..=..........*...+...118...
.......=..........672............*.................713...................................120..........&.....................237..733........
........723....77*.......765........453....296.......*...........................392.554*.......@......770.878.569..../..............757....
........................./............*.......@.....518.................360*.................272...602........*....456....614/..............
..............*677............593.460.51..571.................136..758.................422........+.........................................
...........265.......974....../...........=..............142..................82......+.........$......591*...........$......&..............
....542........44.......*297.......................=.......*.......516.......$.................113.........198.......792..244......391......
......&...$........737*.............743......741.64.....688........*...........647.986..+588..................................=......&..129.
...........4...........14..............$.397*................896..832...810*.........*.............656...........996..........618.......*...
.......765..................887....8..................226.......%...........149......884.678..........*...358....*................915....956
........*...................*...../....514.............*................995......429.......@../969...434...*......955....../..210*..........
.....672....@......@.......322.........*........404#...784.............../..#884....*......................506..........984..........708....
..........757..712.195...............188.....................895...................326...501.480..&524..........998./..........996.....*....
..972.160...............857..293..............274....-...-...........807...%............*....................+...*...128..313.........478...
...*..*...804............*...........334..110*.......974.459...........*....801........727.595..778.........699..800.........*..............
.934..798.%...............37.....191.............*............@.......75...........486......*.................................323...........
................................*......387....477.200......360.......................*....962...47................................179.......
.....................884........985...................................67..145*.......292................191..323...213..............*.......
.....................$....860.............700.147..................$..&.......334........282..267...........*.........-.93..867........525..
..............492.......&...*....91.......%...*....779.......-691.93.......@.........710.*....*...=...310..........97.....*./..........*....
..........568*.......708...216..............780......*....................312........*....438.....346....$..$327...=......5........756..855.
.......................................261......807.261.............................42......................................................