pico-8 cartridge // http://www.pico-8.com version 34 __lua__ local frametime= 0 local yaw= 0.125 local texbuffer={} local dots = {} local nodes= { -- each node entry contains the following data -- [1]= {x,y,t} -- [2]= current vector from src to destination node (placeholder -> nil) -- [3]= list of neighbouring node indices which are reachable from this node --[[ 01 ]] {{ 33, 8.5, 0 }, nil, {17,2,3,13,10,16}}, --[[ 02 ]] {{ 57, 3.5, 0 }, nil, {18,19,25,4,3,1,17}}, --[[ 03 ]] {{ 47, 35 , 0 }, nil, {1,2,4,6,7,12,13}}, --[[ 04 ]] {{ 71, 21.5, 0 }, nil, {2,25,5,6,3}}, --[[ 05 ]] {{ 93.5, 29 , 0 }, nil, {25,10,9,8,6,4}}, --[[ 06 ]] {{ 77.5, 50 , 0 }, nil, {4,5,8,21,20,7,3}}, --[[ 07 ]] {{ 46, 54 , 0 }, nil, {3,6,20,15,11,12}}, --[[ 08 ]] {{117, 50.5, 0 }, nil, {9,12,11,23,21,6,5}}, --[[ 09 ]] {{118.5, 29 , 0 }, nil, {10,13,12,8,5}}, --[[ 10 ]] {{118, 9.5, 0 }, nil, {24,16,1,13,9,5,25}}, --[[ 11 ]] {{ 26, 63.5, 0 }, nil, {12,7,15,14,23,8}}, --[[ 12 ]] {{ 13.5, 44.5, 0 }, nil, {13,3,7,11,8,9}}, --[[ 13 ]] {{ 13, 22.5, 0 }, nil, {1,3,12,9,10}}, --[[ 14 ]] {{ 12, 94.5, 0 }, nil, {11,15,17,16,23}}, --[[ 15 ]] {{ 31.5, 88.5, 0 }, nil, {11,7,20,18,17,14}}, --[[ 16 ]] {{ 3, 112 , 0 }, nil, {14,17,1,10,24,23}}, --[[ 17 ]] {{ 32, 117.5, 0 }, nil, {15,18,2,1,16,14}}, --[[ 18 ]] {{ 50, 102 , 0 }, nil, {20,19,2,17,15}}, --[[ 19 ]] {{ 71.5,106.5, 0 }, nil, {20,22,24,2,18}}, --[[ 20 ]] {{ 61.5, 74.5, 0 }, nil, {7,6,21,22,19,18,15}}, --[[ 21 ]] {{ 92.5, 67.5, 0 }, nil, {6,8,23,22,20}}, --[[ 22 ]] {{ 90, 88.5, 0 }, nil, {21,23,24,19,20}}, --[[ 23 ]] {{118.5, 83 , 0 }, nil, {8,11,14,16,24,22,21}}, --[[ 24 ]] {{105, 112.5, 0 }, nil, {22,23,16,10,25,19}}, --[[ 25 ]] {{ 89, 126.5, 0 }, nil, {19,24,10,5,4,2}} } function redir(dot) -- dest point becomes new source point local dstindex= dot[3] local srcnode= nodes[dstindex] -- pick new destination randomly local neighbors= srcnode[3] local dirs= srcnode[2] local next= (rnd(#dirs) & -1)+1 local p= srcnode[1] dot[1]= {p[1],p[2],0} dot[2]= dirs[next] dot[3]= neighbors[next] end function drawdot(pos) -- 5x5 dot -- 5 individual pixel colors are stored in each nibble of a 16.16 hex-value local dot={ [-2]= 0x0.1210, [-1]=0x1.3431, [0]=0x2.4542, [1]=0x1.3431, [2]=0x0.1210 } local px,py= pos[1],pos[2] for sy=-2,2 do local p= dot[sy] local y= (py+sy)&127 for sx=-2,2 do local x= (px+sx)&127 local c= sget(x,y)+(p&15) if (c>15) c=15 sset(x,y,c) p<<=4 -- move to next nibble end end end function prepare_nodes() for i=1,#nodes do local srcnode= nodes[i] local neighbors= srcnode[3] local pos= srcnode[1] -- print("node "..i..": "..pos[1]..","..pos[2]) local destdirs = {} for j=1,#neighbors do local dstnode= nodes[ neighbors[j] ] local srcpos= srcnode[1] local dstpos= dstnode[1] -- decide shortest way to go from src to dst position -- texture is repeatable local dest={} for i=1,2 do -- src is on left quarter and dst is on right quarter: go negative route if (srcpos[i]<34 and dstpos[i]>96) then dest[i]= dstpos[i]-128 -- src is on right quarter and dst is on left quarter: go positive route elseif (srcpos[i]>96 and dstpos[i]<34) then dest[i]= dstpos[i]+128 else dest[i]= dstpos[i] end end local dx= dest[1]-srcpos[1] local dy= dest[2]-srcpos[2] local length= sqrt( dx*dx + dy*dy ) destdirs[j]= { dx/length, dy/length, 1.0/length } end srcnode[2]= destdirs end end function _init() cls() prepare_nodes() -- initialize all the dots srand(1) for i=1,25 do local dot= { {0,0,0}, -- [1]= src position x,y,t (t is interpolation factor from 0..1, t=0: src, t=1: dst) {0,0,0}, -- [2]= delta to destination (i % #nodes)+1, -- [3]= dst index (range: 1..25) } redir(dot) dots[i]= dot end -- store copy of texture in 0x8000 (only possible in v0.2.3) memcpy(0x8000, 0x0, 0x2000) --[[ -- previous versions: copy to lua table (8 pixels) for i=0,0x2000,4 do texbuffer[i]= peek4(0x0+i) end ]] -- fill tile-map 16x16 for y=0,15 do for x=0,15 do poke(0x2000+y*128+x, y*16+x) end end -- repeat 16x16 tiles (128x128 texture) poke(0x5F38, 16) poke(0x5F39, 16) poke(0x5f36, 8) -- tile 0 is not transparent palt(0, false) -- color index 0 should not be transparent end -- this was once used to draw a complete "floor" -- to save memory and code, it only draws a single scanline given as "y" -- not quite optimal. function draw_floor(y, pitch, yaw, moveu, movev, posz) local cx, sx= cos(pitch), sin(pitch) local cz, sz= cos(yaw), sin(yaw) -- interpolate left and right screen border from top to bottom local leftx= ((cx-sx)*sz - cz) << 6 local lefty= ((sx-cx)*cz - sz) << 6 local linez= (sx+cx) << 6 local rightx= leftx + (cz<<7) local righty= lefty + (sz<<7) -- delta for left and right side local deltax= -sz*cx local deltay= cz*cx local deltaz= -sx -- here some things left to optimize leftx+= deltax*y lefty+= deltay*y rightx+= deltax*y righty+= deltay*y linez+= deltaz*y -- leftz and rightz are identical local z= posz / linez local lu= leftx * z local lv= lefty * z local ru= rightx * z local rv= righty * z -- draw horizontal scanline with given tline( 0,y, 127,y, lu+moveu, lv+movev, (ru-lu) >> 7, (rv-lv) >> 7 ) end function _update() frametime+=0.01 if (btn(0)) yaw+=0.005 if (btn(1)) yaw-=0.005 if (btn(2)) frametime+=0.01 if (btn(3)) frametime-=0.03 -- define our 16 colors: this is the final on-screen palette -- pal( {[0]=0,0,131,3,139,138,10,135,7, 7,7,7,7,7,7,7}, 1 ) pal( {[0]=0,130,128,129,1,131,140,3,139,11,138,10,135,7,7,7}, 1 ) end function animate_texture() -- restore texture from 0x8000 into tile-set memcpy(0x0, 0x8000, 0x2000) --[[ -- previously: restore texture from lua table (8 pixels per entry) for i=0,0x2000,4 do poke4(0x0+i, texbuffer[i]) end ]] -- draw traffic (traveling dots) for i=1,#dots do local dot= dots[i] local pos= dot[1] drawdot(pos) for j=1,3 do pos[j]+=dot[2][j] end if (pos[3]>=1) redir(dot) end end function draw_layers() -- we can't fill the whole screen in 1 frame, skip a few rows local border= 20 local pitch= -sin(frametime>>3)/16 -- camera direction up/down -- local yaw= frametime>>4 -- camera rotation left/right local bounce= sin(frametime>>1)*1.5 + 1.5 -- spacing between layers -- movement in the plane (just shifts u,v) local posx= frametime*10 local posy= 0 local dither1,dither2= 0x0000.0000, 0x0101.0202 -- dither values for odd and even pixels for y=border,127-border do dither1,dither2= dither2,dither1 -- swap dither in every line: 0/1/0/1... -> 1/0/1/0... -- draw 3 layers at depths 8,4,12 -- each line is first drawn in consecutive draw_floor(y, pitch+0.01,yaw, posx+5,posy+10, 8+bounce ) draw_floor(y+1, pitch-0.01,yaw, posx+10,posy+5, 4-bounce*0.5 ) draw_floor(y+2, pitch,yaw, posx+5,posy+15, 12+bounce*2 ) -- sum 3 layers local src1= 0x6000 + (y<<6) local src2= src1 + 64 local src3= src1 + 128 for x=0,63,4 do -- read from 3 layers (8 pixels at once) local c1,c2,c3= $(src1+x), $(src2+x), $(src3+x) -- parallel add of 4444.4444 values (8 pixels per 16.16-value) -- 4bit pixels (0..7) in 16.16: 0x0123.4567 -- add even pixels (mask out every 2nd pixels, making room for overflow) -- ("l" for lower bits -> even pixels, "u" for upper bits -> odd pixels) local l= ((c1 & 0x0f0f.0f0f) + (c2 & 0x0f0f.0f0f) + (c3 & 0x0f0f.0f0f) + dither1)>>1 -- add odd pixels (unsigned shift or the sign bit will bother us) local u= ((c1 >>> 4 & 0x0f0f.0f0f) + (c2 >>> 4 & 0x0f0f.0f0f) + (c3 >>> 4 & 0x0f0f.0f0f) + dither2)>>1 -- saturate pixels which produced overflow -- we are added 3 values 0..15, so we have to look at 2 bits of the next nibble -- if any of these 2 bits is set, we set the pixel to 15 (max) by ORing a mask which simple sets all bits or none. local ol = l & 0x3030.3030; -- extract overflow bits local ml = 0x3030.3030 - (ol >>> 4); -- mask for saturation: if overflow-bits are set, lower nibble gets 0xf l= (l | ml) & 0x0f0f.0f0f; -- remove overflow bit and fill saturated areas -- same again for the odd ("upper") pixels local ou = u & 0x3030.3030; -- extract overflow bits local mu = 0x3030.3030 - (ou >>> 4); -- mask for saturation: if overflow-bit is set, lower byte gets 0xff u= (u | mu) & 0x0f0f.0f0f; -- remove overflow bit and fill saturated areas poke4(src1+x, (u<<4)|l) -- merge odd/even pixel and store back into from buffer end end -- clear the last two row which we used as a temporary buffer memset(0x6000+(128-border)*64, 0, 64*2) end function _draw() -- we repeat the whole screen anyway, no need to clear cls(0) -- create animated texture in tileset area animate_texture() if (btn(4)) then -- draw animated texture amd show node numbers memcpy(0x6000, 0x0, 0x2000) color(0) for i=1,#nodes do local pos= nodes[i][1] print(i, pos[1]-2, pos[2]-2) end else draw_layers() color(3) print( "press left/right up/down btn-0", 0,0 ) end -- show performance -- print( "cpu: "..stat(1), 0,0 ) -- show pal color(3) print( "pal:", 0,119 ) for i=0,15 do color(i) rectfill(i*8,125,i*8+8,128) end end -- texture by jade/sweet16, representing a neuronal net -- linear connections on this triangular network made the traffic easier __gfx__ 11111111111111112233457644445556885443333333344556899888a889654333332334455678998888888abca9999875554444444444447944444444853222 11111111111111111223345775455566885444333333334455789a99aaa965544445677888877666556667898a98777899765555444444444a74444446732222 111111111111111111233444786555668965443333333344456789abdec9777889898776554444444455579779876666679987654444444447a5444459533222 2111111111111111122334445787566789654443333333444567899beedba99876432333333333334445698668865555566779986654444445a7555589433222 22111111111111111222334445798667897544443333344557889aabeec97654432222222222223333459855579655555555556899864445557a5555a7443322 222111111111111112233344455699778a7654444444567899988789bba976443322222222222223333795445796544444544445579a9755555a8558a5443333 222221111111111222333444445668989b8655556778988765556679a8897654332222211222222233694444469654444444444444457aa97558a66a75444333 3332222222222333334444555566689acda87899988644534344556987778654322221111112222234953344459644444444444444444468ab97b8aa65554443 655455544545555556676777788999abeeda9876544333233334456976667854332221111111222238633333349744434433334444444445579bdeea77675656 887777777777777777778889998899aceed865543333222222334578655567743222211111112222773233333388343433333333444444455567beedbaa99988 5665554444444444445555545666789aabb755443332222222234587544545664322111111112225832222333378333333333333344444455668aeecba988766 4433323322222222333333445566898777985443332222222222358643334447632211111111223842222223336a433333333333334444455679abb88a986554 4433322222222223333334445568976666796443332222211222368433333334653222111112237622222222334a433333333333334444455798899777898654 54333322222222233333344557876555556885433222221111224663222222335753222222223673222222222249633333333333334444567987799766678875 86443333223333333333344578655455555685433222211111234752222222223574332222235742222222222239633333333333334445579766699665555688 78764333333333333333346876544444444577533222121112235632222122223366433333357532222222222239633333333333334446787655699655544556 45787544333333333333478654433333344468533222221112246532211111222346754444576332222112222338743333333333334468855545589654444444 33457875444434444445885444333333333457643222222222346432222121222345775545774332222222222336943333333333344687544444579544444434 33345688655444444579754333333333333345753222222222356422222222222334687667853333222222222334a54333333333446874434444469544443333 33334456987554455885443333333333333334764322222223466322222222222334579a99644333222222222335964433333334467644333334479544433333 3333444567997778975444333333322222333357533222222357532222222222334458aeea654433322222233334964433333344685433333334469544333333 333444455679deea754444333333322222233347643333333467433222222223334568ceeb865433332222333334985444433457754333333333469544433333 33344445667aeeeb7554443333333222222333358533333334764332222222333456899cd9997653333333333345885444444578543333333334459644443333 3344456689989cc9aa864443333332222223333477543334458643333333333345688767a7778986533333333445796544446875433333333344569654444433 4445679987666a95579a965543333332222333346854444456854333333333446887555697655678876433344445696544568754433333333445569755444444 46798866555569855555799764433333223333334775544558744444443444578654444687655555679965444555696555787544443333334445679755554444 9987555445555985444444688765433333333334469655556965444444445787533334448855444434568987556679866787554444333344445567a765555578 7644444444445985444433335677754433333334458865557a6555555557875333333334685444333334458998777a978975555444444444555678a866679aa8 444444444444588544433333344577765433334445796666996666666787543322222334676443333333345679999bca986665555555555667778adc99aa8654 444444344444598544333333333345677765444455698667a8777777886443222222223357644333333334556689beedaaa99a9999899999999aaeeeb9765544 44444334444458844333333223333344578766555568a878a8887788754432222222222347643333333334455678aeec988888777766666667778aeeb8655544 44443333444448844333332222222333445688876667998aa98899865443222211122222477433322333344556779ba99765555554445555555667bb9a965544 444444333344488443333222222222333344568998789baba99a976554332221111112223674332222333345567897668865444444444444455556a8669a7554 444444334444497433333222222222333344456689a9acccbba8766544322221111112223574322222233445567865545785444444333444444555a855579865 7444444444444a64333332222222223333445566779abdeec987765543322211111111222475322222223345568754443468533333333333444556a755556897 9754444444445a74333332222222233334445567788abeeeca87665433322211111111222476322222233344577544333336854333333333444456a655555579 6886544444445a644333322222233333445566789aaaabdcaaa8664433322211111111122366332222233344775433332222685333333333444455a655544445 457975444444597443333333333333344566789999999aba8789976543322211111111122367433222333446754333222222248533333333344446a654444444 4446996444455a75444333333344445567888888888889a97676788754332222111111222357433333334457543322222212224863333333444456a554444444 4444579755456a75444444444555667777766777777888a866655678865432222111122222575333333445653332221111111224863333334444579554444444 4444446897556a755455455566777766655556667777779765555555677643322222222222396333334456543222111111111122386433344445579654444444 4444444579767a86555567787766655444455555666667a865544444456675432222222223387444444466432221111111111112237754344445589655444444 4444444557998b976788987665544444444444555666669755444334444556664332222233388544455775332211111111111112224675444455689655544444 444444455569eeebaa98766554443333333344445555569754443333334444567643323333469544556854322211111111111111223477655555699665555444 444444455679eeedb987665544433333333333344444569744433333333333455676533334469755678654322111111111111111223457866566799766555544 444555679a99ceebaa987765444433333333333334444597444333333333333344577654445697567975433221111111111111122334567876667a9776665555 55678998876689aa87889887554443333333333334444587544333333333333333445798655698779855433221111111111111122334556798778a9877666555 89997654455566797665677877655443333333334444569754443333333333333333346898779a898655433222211111111111122334556789889b9888776778 87543334444555688655455567777654433333444444559754443333333333333333344568a9bcba8665443322211111111111223345566788a9aba988889998 544333333344455687544444444566776544444455555698554444333333333333444455679beeea9888655554444333333333444356677789abcdbaaaa98755 4433333333333445686444333333444577766555555556976554444443444444556567899aabeeebaa9999888777777776666777888999999abceedba9876554 4333333333333334477443333333333345567887666667a86655554555556677787788777779bbc9765554444443333334555555566777889aaceedb98766554 4333222222233333458643333333223333445689998889b9877677777777787666655455556897798544333222211111122222333344556679aabcbaa9876544 4433222222222233346854333332222333334566779abdeda99999876655544444444444556976569744332222111111111112223334456789999b9877898764 76543222222222233458743333332233333444556678beeea87765444333222233333444468755445954332222111111111112222334556897778a8765556788 67765433222222233446864433333333333445566789bcdb965554333222222222333444577544444794322222111111111122223334578866677a7544444455 344566654333223334457754433333333334456689988aa997544333222222222223344568643333336732222211111111122222334577766666796543333333 222335666544333333446865444333333344557887678a7788644333222222222223344566433222233663222211111111122223456666555555695443322222 11112223456655433344578655443333334678866666896568743332222221112223344664332222222475322221111111222223566555444444586333222111 11111111234566675444568865544434467876555557975556863332222211111222345653222222222248422222222222222345665444344444586432222111 11111111112234578876567976554446897544444457855444685322221111111222346533221111111125832222222222223466544333333334576432221111 11111111111122234799877898766799744333344458754433378322222111111222456422211111111122672222222222245664433332233334576432211111 11111111111111123456899abdc99964333333333468543333338633222211112223475211111111111122276333333333467543332222222334576432211111 11111111111111122345568adeeb7544333233333477433332224653222221222223662211111111111122247533333335865433222222222234566432111111 111111111111111223345679cee96443333222223485333222223465322222222235642211111111112222335864433488643332222212222234566432211111 1111111111111122333458a9abb75443333222224674222222222356422222222247532211111111122223344687557984333322222111122234566433211111 111111111111112223479977a9a7544333222223475222222222223664322222336632222111111122223344559cc98643333222222111122233566432211111 111111111111112245797557a89864433322222367422222222222246543333335743222221111122233445567beec8543333222221111112233576533221111 111111111111123467644469878964433322223475322221112222235754333347633322222222222334567889beeb9654333222221111112233576533211111 1111111111122467644344697678643333222335732222111112222346754444774333222233333455677777678ab98975433222211111112234576543211111 11111111122357643333448866686443333233466322221111122223357754568643333344455666666555555568976788543322221111122234576543211111 11111111235764322333459755687543333333575322211111122223345876688555555666677655544333444468866667765332221111122234576443211111 11111123466532222333478655578543333334664322211111122223345799998777777766555544333233333457765555677643222222222334476443211111 111122456532222223335965555785433333457532222111111222233447addb9988766544444333322222333458755444456765322222222333476433221111 112235664322222223336954455696443333467432222111112222234457ceec9876554433333322222222333457654444444456643222222333476433222221 123566432222222223349744555687544333576432222221112222345679bedba876543333332222222222233357644333333334665332222333477433222222 246653222112222223369544455687544434675322222221222223356889abb99987654333222222222222223357643333322222356553333334488443332222 7753222111122222234863344556786444457643222222222222346787789aa87778875433222222222222223358543332222222234576433334478543333336 74322211111222222359533345567865444685332222222222345776666798986655678643222222222222223458533322222222223457865444588444444688 22222211111122222377333344567875545874333222222234567654445787896544446776432222222222233468533322222222222344689644598544568853 22222211111122223585333344567886556953333222334456654333446876786544333457764222222222233468533322222222222334457985589556886432 222221111112222237733333445678966588443333334566654333333467656874433322234675332222223334674333322221222223333446998ab989754333 22222111111222224853333344567897669744333344666543322223347654577533322222234676432222334578543332222222222333444458beed97543333 222222111222222368333333445678987896443435676543322222233575444685332222111122467643333445775443333222222334445678aaceee96544333 322222222222222486333333445578998986444678654332221222223664333576322221111111212576544456876544333333334556678899878cdba9754333 3222222222222236843333334455689a9a76568875432222111122234753333466322211111111111246776567886554444455666776665544557aaa68996433 3322222222223348633333334456789baa87898544322221111112235643322357421111111111111123467789a9766666788765543333333445987a65579954 654332222233346853333333445678accaa986543322221111111224663222234752211111111111111234579bdc988777655433222222233346965984445787 666543333334458754333333445679ceeb9765443222211111111124742222224653111111111111111223468ced9876554322211111112233488447a4444456 5566654433445686444333345678aaceeb8755433222221111112236632222223563211111111111111123457acb8655432221111111111223596444a6443344 3444677554556885544345578898889bba9765433222211111122247421111122474211111111111111122467778754433221111111111112378444479443333 3333467775667975555577777665667a97887543322222222222235632111112236521111111111111112357655676443211111111111111138643345a443333 333334568988aa767898765444444579866787543222222222222475221111112356211111111111111114644445665432211111111111112585333337643333 3333334468adeca98755333233334568765567754322222222223574221111111246321111111111111155433334566432211111111111112764333346754333 33333334469eed976543222222333458754454675332222222234763222111111246421111111111111564322233457432211111111111124653333335764333 33333334457cdb865543222222223348644443457643222223335753222111111236622111111111115632111222347632111111111111136643333334675333 33333344458a89865433221112222348743333334665323333346743222211111235632221111111256311111111234742211111111111246433223334575433 33333344559766875433211111122348633333333368633333358643322221112235642222111112662111111111223563211111111111356432222333466533 33334444578655577443211111112248633322222335775444479543322222112224663222222136631111111111112365211111111112465432223333467543 33344444586544457643211111112248632222222233478655597543332222112223674322222366211111111111111246311111111113564322222333457654 444444457854444457532211111222376322222222233468878a7544333222222223594333334663111111111111111136521111111124654322222333456754 4444445586433333456432111112223763222222223333468cdc8654443222222233496333357732111111111111111123642211111235653322222333456764 5444455674333333345642211122223763222222223334458deea866544332222233478444586432211111111111111122574222222236643322222333346875 5555556764333222334554222222223763222222223334569ceca998866543332333469655764332211111111111111122475322222357533222222333445785 65555677543322222334653222222236632222222233445898aa8777777876654433459778754332221111111111111112357433333476433322222333445686 7655668653322222222346532222223763222222233345886689766655556778877656bca8654433222111111111112222237744444686433333323333445678 866667864333222222223565322233377422222223346876567976554433344567999beeb8765543322211111111112222235864445785433333333333445579 977779754433222222223456433333378332222334468755556876543332223334457aeeca998775543322211122222223334786556875433333333333344568 9877897544333222222233467533334883333333456765444567765433222223333457bba8887888887655332233333333344687668965443333333333344567 79889866543332222222334477433348843333345675544444567643322222223334589899776666666788776655333434445679879865544333333333444456 7aaaa86654433322222233345774445884333345665443333446764332222222233469767787655544444456688887665555667999a876554433333333444556 7adda87654443333322233344587556885444457654333333345764322222222233487556678655444333333334466788888778accb877655444444555555667 adeec9866555444333333334446876688544567644333322333466432222222222368544556775544433322222233445567889abeeda99999999999a99aaaaaa 7aeecaaa98776555544333444457877996557865433322222223674322222222235854444455775443333222222223344456679adec988777877765555555576 59a9998888898777776555444456898998788654333222222223575322222222237743333344577543333222222222334455679a9aa876554433333333344445 698667987665666778888776656779aab99865443322222222224753222122222475333323334466433333222222233344556887668965544433333333334445 79655678865544445566667789999abddc9665443322222222224664222222224764322222333447644333323232333344568866556975544333333333333445 96544556886544433344445567789aceec8765443322222222223674322222225742222222222344764333333333333345687555555886544333332233333347 8544444457765433333334444445679deca865543322222222223575332222247532222222222233576443333333334456765554445696554333322223333359 64333333456765433333333344445789b99987654332222222223576433332367322221111222223447744333333444578554444445688554333322222333387 53333333344577543333333344445678a87789865433222222233477433333585322111111122223345775444444456875444444445568654333332232333596 33222222233346764333333334445678976666887543322222333477543344763221111111122222344587554555578755444334444557754333332223233863 22222222222334576433333333445667975555567875333333333469544446743221111111122222334468765556787554443344444456864433333333335832 22222211122223356644333333445567965444445578644333344459755558632221111112222223334456887778976554444444444445785333333333337732 222111111111222345654433334456669754443344457865444444598655774332222112222222333344557acba9876554444444444444696433333333358322 211111111111122234565543344455669754433333444688655555689666864332222222223333344455567aeec9876554444444444444588443333333487322 11111111111111122345665444445566975443333333345688766668977885433222222233334445567899aceedb977655444444444444459644433333594222 11111111111111112233466544445556885443333333344567987778a889754333222233344457788999999acdbaa98765554444444444447944444334873221