adventofcode

git clone https://git.ce9e.org/adventofcode.git

commit
adfcef78c31a3f0ffecaefd93f503d266492d43e
parent
2eb85bdbb6da1817d4de1b164fca36fe7ae9236c
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-12-21 10:22
2024-12-19

Diffstat

A 2024/19/input.txt 402 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A 2024/19/solution.rs 44 ++++++++++++++++++++++++++++++++++++++++++++
A 2024/19/test.txt 10 ++++++++++

3 files changed, 456 insertions, 0 deletions


diff --git a/2024/19/input.txt b/2024/19/input.txt

@@ -0,0 +1,402 @@
   -1     1 wrgrwbug, uurb, rbubr, buggb, uuwwwrb, gg, wgburr, ubg, wrbuw, grrr, rur, ggb, bur, guwggg, rwbr, grurb, bgurguw, ruub, uguugg, bwr, brggb, rwuu, rrgbuw, bgub, wbbb, rgg, ubrgb, wbrgw, rgwwuww, b, buw, grb, rww, grurw, ggwb, rbw, brbw, gb, gwwr, bugwrg, uwbww, ggu, bbbbbbur, gu, ruurw, uwr, gbur, gbgbu, wrwru, urrr, bruu, wbbgrg, gwrwr, brru, buub, wrbb, wrb, urugbur, bgwwr, bwubb, wrbbbbbb, gggbgur, www, rbuuggr, rrruwguu, wgr, r, ggw, wb, gbgr, bwbu, wgwuugug, uuug, grgw, gbbuwrb, ug, gub, wbrbug, wrrgrr, rbuu, rrg, brbu, ugwu, bguw, guww, ugw, wwg, ugrb, ggrw, uug, uww, bbw, bwrw, urr, bwbuw, rbugr, uubbwu, rru, rbb, wbb, wguu, urb, rwbrubb, rrgru, ugg, rgw, gwbb, rbrr, gbwg, wgrb, wbbbbbug, u, bru, uububwwr, wburugg, wrgugg, urgu, uuuwg, grbuwwb, brg, grwubr, wbrww, bugu, wgwrbwu, urrbr, w, wubwu, gbgugw, ggrbwr, ugurrr, ubrgu, bggrb, gugwb, rw, uuwg, wguw, wuru, rugu, ubgru, bgubr, urww, buggg, wwb, gwbu, rgbbbb, burrw, ugbuwr, uwbw, bug, urbwgwbu, gubwuur, wbgrbb, wub, bb, ugbgwr, gwbww, gggbw, bggg, gbwbur, wggg, ruuug, grw, rwg, wguwbr, rggr, wugw, rbwb, ru, wrbur, gug, rbru, buuubwb, gbwgug, ggubu, buwbwr, gru, wuw, wbg, wbr, ubgw, brwugb, rbwugr, rb, wbur, rr, wbwubuwr, wuggrb, bww, ruw, rbu, wrbrr, ubwrrwbb, guu, brb, rgrr, wgg, bgr, ggruug, bgug, ugwug, rwrrb, grbg, bbr, ugrbbrgr, gwbg, wbwgw, wbbrrb, wwgw, rwrg, wrrugr, wg, rgrwwbg, guw, urg, uugbg, wwbw, ubr, rurb, gugg, wgu, rguug, rwb, wrr, ggbwuu, gw, uuwrwu, gbbugr, rwwrwubr, uwwwgg, uur, uuu, wug, gwrrg, gwu, gwurg, bwrugr, bgb, grr, wuuug, bgw, ubwr, bwbugb, rgwrwg, wruwgru, bbu, ugbuwgu, rbr, ugrw, bugub, rwuuw, grbbuwgr, wbu, gwb, guwwurwr, gbbub, wbrg, bgrbw, urggurw, ruu, wuu, wruu, gbwb, bgwug, rurr, ubuwgw, bwugggb, gurgb, rbbwrgru, bbrb, bubu, bbur, rgb, rbrwr, bbb, bwugr, ggr, wwub, ugrwbrw, rugg, rrrwu, wbgrr, wuwrr, rgu, gbb, bwuw, wbuwrrgb, bwwrgu, ururwubr, rrbwwuw, rwrwb, bwruub, wgrrg, brr, ur, uw, bbg, wbwwr, brur, wruwbb, wwr, wwu, uuwb, ggurb, uub, rrb, rbwr, rbbbb, rg, rgubbb, ubbgruwr, wwwgu, bwgbrrw, wbw, gbguu, wgwr, grurbur, wuburuu, rwgrgr, wur, bwb, wgw, rwr, ururb, gur, rrgwww, bw, ubgbru, rbwbgrb, wrbrb, wubw, wgbub, wrg, rrw, brbr, ugu, guuuugb, wurbgwgg, uurbbgw, urw, rurg, ubw, wgbu, rwguu, gbu, ubuuw, wubruru, bwg, wuuuu, wu, wuuu, bwru, uruu, gwr, bgu, wrgr, ggrugbg, bwgu, ggg, wwwgb, rgru, wbgbu, gr, ubu, guubwu, rgwuwug, bwwru, bub, gbuu, guwbwur, gubrurw, bwrbuwr, wrw, rrrrrg, rwu, gubbuu, uru, uwbg, rurru, rrwwbb, ubgb, rgwugg, buu, ggwwbr, uwg, bbwrgu, ww, urbgbbg, uggbrww, gwg, wbrr, rbrb, ruuwgr, guubrg, uwbbb, rbg, bbgru, gbw, rwrrg, ubrwr, ugb, uubgwru, buwbuwu, wbuww, rrbr, rwbw, ggwr, grrwrg, gbrgwu, bbbu, uwub, ubb, gwur, brbruug, gww, wwugbw, rwuggw, bbrbr, rrr, rbgggw, rug, ggrrbr, brrbb, uwu, ruwwr, rgr, br, rgrubgg, ugr, wgb, wwwr, ggrbbb, uu, gubgwgb, rwbgbr, wru, wgww, rub, uuw, rwubrruu, grg, brwguug, guguu, ub, bgg, wuwu, wr, bwbg
   -1     2 
   -1     3 rwuugrgubgwgbrrurggwbugbuuwgbugbuwwwubbwbbw
   -1     4 rubgrugwuwburwwrrrwggrrrbbwwwwwuwuggururgrurgwbwwwugwwggur
   -1     5 wrgrrgbbgwuwguruurwbgurgubgbwuwwwuburggbwggwrwwggbg
   -1     6 uwwgruguubwbbgurubbuwggwuuwrrbwuugubgwuwbbggwggbbrurwu
   -1     7 ububrgrburwrrbbbugrubrugrugrwwbwguwggwrrrurwwuuubgwwbbbb
   -1     8 gwrwugubugrwgrrrgrwbburgbbrgrbuwwgrggubbugugwuwbww
   -1     9 uwgwwrbwwurbrbburubbrubrguwbugbbbbugruurgugwurgwurburrbwrr
   -1    10 gggbugbwuuwbubwuwgwuggurwrgbbbuuwuggwbugugwr
   -1    11 ruwburwgbuguwbbuuggrwgrgbbugubgrggrbuwgrbrubwguwgubrubggbg
   -1    12 bgwgwubrwggwgbuwbuurgugurbburbburuwgwwwbrubrrrgrgbrgwwwrug
   -1    13 wbgurwwrrwgwrugwbgwbbrurgurrbgwwwurbwgrubgbg
   -1    14 brwwgbguubrgwguwwuuwbwuwgrbrrbrrgubgrgwuwugbg
   -1    15 buuwugbuurwugurugubrwburruwgrgwggbubwgwuwbrwguuugb
   -1    16 rrwugbwbgggguburuuuuwwrgubugrwwugwbgbggugrrrurugwwugrr
   -1    17 ubbgbrwgrrwrwrbuwwbbguguuwgwruwbbwgrgggbrbgwggwbwurwuuub
   -1    18 wrbgwwuwbbwbgubrbubrbwwwuwbguwgwguggbgbrburugbg
   -1    19 ggwuwwggwwgbgrbrggbguwrwbgguwggbbgrrwbbgwwuwwbwgrwwgbg
   -1    20 ggwwuggggbbugggggubruuugbrurwgbrbrwrgbwggrr
   -1    21 gggbwuwwbugwurwrbruugwgrbrugrggbgrwgugwruu
   -1    22 bggrgrgbrwrruruguuuwwwgurbrrrgwbubbwrrrbggugrbbrgrwg
   -1    23 ubrugrrrwwwrbbrwuwuuuwwguurbwrrggguugugubbwwgbg
   -1    24 rwrrgrwrguubgrbrbbggbwgruwbbgggwgrgrwbuggubwurwwbgbrubwgbg
   -1    25 buguwuuuruwgggwwbggguuwguurrruwwbugugbgbg
   -1    26 wguwwwrwwugggbuwubwurrbubwggwwrgggbgguruwbb
   -1    27 ggrwbwrugbuwgrbburugwgbgwrbbgrwuwbrwrrrrrbgbrbrwu
   -1    28 ggrggbgbrwrbuwgggwgubbgurbuwuwrurwbwrrruugggggurwrbggbg
   -1    29 bbbgrggbwrrwubgwrguuruwbwurrbrwrugubwwgugububggwrbb
   -1    30 ubwbrurggrwgrwuurgugruuguggwubuwbrrwuwrwrbgurrbrggbwru
   -1    31 ubbrggguwguwugurwgubwwbugrgbguuuwbbuubrbrwruburbbguug
   -1    32 ruwgbbuggwrrrbrruwrgrruurwgbugbgbubguuwguurwgubuwr
   -1    33 uwburgrwuuwwrrrbguurbbuuwrbbggbuggbwugbbuuuuwwggrrr
   -1    34 ugbwwgwuwurrbrbbbugwgbrrrrguwuwguwurugbg
   -1    35 ggrrwuubrurrbbwubrbrugrggbrwbgruwgbwwuugguwrwubuwrwrbgbg
   -1    36 buwgggwgguwrrurrwruuubbwgrgrgbwbgbbwwwugbubgbg
   -1    37 wwgggrbuuugubwurbgugrbrwrggwwgruubwrbbuuuwgbg
   -1    38 wrrrurruuwgwrbwbbgbrbbwrbrgbruuuwubgubgbg
   -1    39 bwgugbrruuwrrwbwwwgbwrwgbrwrguwbggugwbgubgwbu
   -1    40 grrrgbggwbgggbbwbbuburrubrguguuurrgwrbwrugrwububgwrrgbg
   -1    41 urbggrugbgruguwbwurbugbuwgwwwbuugurwguugrrbwgurbgbg
   -1    42 uwwrubrugwrrruwguubuwwruuuwurwuwgbbwbgbgwbuggbgubg
   -1    43 rugbrrgwwubgwbgbgwuwwwugwwubbwuwgwuuruguuwubwrbggbggwugbg
   -1    44 uubbwgbrwwgbggugbbrguggbwuwbgrbgrgurrurwwuwbrrwggggwgbgb
   -1    45 rbuuggguruwrbbgbwbbrbbuuwwgurbrrwbrrubwgbgwgrguurbubbrwrgbg
   -1    46 bguuwubrbgurguurgwbuwgbrbubwwgbbwuubwugbwbuuuug
   -1    47 rbwwrgrwbugbrrggwbwbwwwrwwggubuwrrgrbwwbggrrrwgwwb
   -1    48 ugggwgbbrrwgwgurubbbwgrbbwgguwwggrburgbuuuwuwrrwgwbwggwrb
   -1    49 rbwrbgwwrwrugrburwuwbwgruuururbwbbggbbgbgggbg
   -1    50 ugwrbwbrbgwggwggwguwwrwgbgwruwurggwwrwbgwgrguubbg
   -1    51 guwgbwrgwrurubwbgrwwrgurwbgubbrwbbrwbwwgguwrggwwrwuwr
   -1    52 grrbwruggugrgbwuurggugbguuwburgbbrgguggwubg
   -1    53 brbrggrgwguwwrgguuuwwurgbrrbwwwwwrbwwwurgrgubruwbwggurgrg
   -1    54 bburrurbgwguwuguguwgwruwrggbwubuwwubgwrurwrbrrbbbrgr
   -1    55 gruwguwrurwrwgwwgwbggugbbubbbwuwbguwbubrgrbrrgwbu
   -1    56 brbbwbbguggwbrurrbrbuwgwuwwgugwwbubruurwuuuggg
   -1    57 uwrbggggwwbgrrgbrurgbgugubrrubrgwrrbggrrbbgbrrbgbubggbg
   -1    58 wggbgwrwwruurrruugwgurgbrbwwgbbgbubwgbwbgrb
   -1    59 wbuuugrbgurbrugrruwwruggubrugrububwwbbwgbwrrbguwugrwuggbg
   -1    60 rwurgbgwrbubbwbgrwwruggrbguuwuwugbwurrgurrburg
   -1    61 rrggggbgggurwrgubwgbbwwugwguuubwrrwbbugruwrugbugurgwwwbb
   -1    62 uuwrrrwruwwubwrbbwwurugurbbuwwurbruwrgwgrguwrwrrwwrgrwbugbg
   -1    63 guuwugububrggurgwwugbwrwuubrbugrrbwubrwugbg
   -1    64 wgrbwwuwwbgwbuugubwuwbwguggbwuwrgbbwbwwrugr
   -1    65 urrrwrwbwuwgwrwgburruggbwuwggrwwbwgbwrwggwbrugggr
   -1    66 rgbwubrrwwwubbgwwurbugbrrbggbrugrwgbrugbg
   -1    67 ggwbwbubbgruwrrwbgrwrwgwuwgggwrubrwrubgbwwwbbrr
   -1    68 rbuwrrwggrgwubbrwwrwrbbbbbburbuwuruwgwgbwrurwgbg
   -1    69 uwbrbbrbrbwgggwuguwgugurgrrrwwurrwbuwruurrwgwbrburrrwug
   -1    70 urguwrrgbwwwubrbuwrguubggbrrrgbwrbbrgggruuubbgrrgugugwgu
   -1    71 rwrbrwurrrrwwgbwbwbwgbgggubbubggguwruuuwbrbguwrwugwr
   -1    72 rrwrrwbwwbuwbbwugwbbguuwbwbubgrgubgrrrbgwuuggwrrbbrgb
   -1    73 uwrgrrbbbruwgrbbrgwrwuguwrbrggwbbubgruggrgbg
   -1    74 uguugugwwubuugrrbwubrrrwrwgbgbbbgwwrbbrbgbg
   -1    75 bwwuruuwburbruwwrgbbwruwurgrrrbrbuggubrbbubgbrbgwgrruuubw
   -1    76 rrugubuwrggwrgbrrbuurbbwgbguguggggrbuwwgggwburbgbg
   -1    77 grwgburuwwwgwwrgwwgwrwgwugubrgrwuubwwuwggrwwrwgur
   -1    78 ruwugugbuggwwwgurugrbbrgrubrrrrrwgwwwugbg
   -1    79 rruwwrrwrbwugbwwguwurggruuurbbwggggggrwuugbgwg
   -1    80 ububuubbggurbuwwwrrgbuurbuggrgbrwwgggwgwwrgrwuwggbguugbw
   -1    81 wruwrwggbbuuwgwbuurburuguwwgbrguwgwuuurggbg
   -1    82 bwbbgwrbrbgrrbgbguuruwugwuubuguggrbguruwrruuugubgruwggbg
   -1    83 gwurgbwrgbgwrwbgbbgugbrwuuwggrggurbbgubrrugubwubrrwrgw
   -1    84 urbbuuuuurrbgrbbbbbburrggwrrbwrrgbwwwwwuggwwwwwbuuubuugw
   -1    85 gbggrwugbwrbuwrbubuugrbrubbgwgrubbgbwuuurrbrwgrrbwbb
   -1    86 rrwurbwrwurwuugbgbgbwbbbuuubgwwgurgwgubwgbg
   -1    87 ugrbwwbuuurubbrgbubwgbuuwbgwuwuugggwgbuwugrgubwgrwggbgbg
   -1    88 rgbrgbbguruubrgrbwwbbbwubgubgwgrwwgggguwrrbrurbgwrrggw
   -1    89 bwbburbgbwgrurgwrrguburrbwwuwrwrrbbubgwruuwwugbg
   -1    90 uwrbwwrrbrbbbrrbbbbbburugugbburugggbwuggbgbgwbwwbuuubbgbg
   -1    91 rugwgbrwgwuwubwwuwgbrgwggugubwugwrrwgruwbbgrgbg
   -1    92 rbrgrguuubgwwwugrrwrbrruuwgrgugubgwbuubwrrwbbbrrwbbgbg
   -1    93 rbgruwbggwbwgwgbrwurbwgbguggrwbrbwwuuwggbugguggggrwubrbuw
   -1    94 gwbwurrwuwgwgrrbrgbuuwrrgrwwuurrwrrburuwuub
   -1    95 wgwugugrwgbrbugbgurrwggbgrubwggrbuuuuwgbg
   -1    96 wguggbuguwuwrbwbrwgguwrgbwgbgrwruggurguubgruwbbugwwug
   -1    97 gwuwbbgburrrwbgrbwuguwubwuwruggrbuuuwruuwrrg
   -1    98 gwrwwrubrruwuwubrggwbrbubbbgrurwwrbgwgrgrbbwwwbgbrwugw
   -1    99 ruggruuuwbgbbwwurrwruwrbwbwubuwrbrbgbrwuggurwwwurw
   -1   100 rwrwbuugurwwuwwruguubbbwwwwgbrurububrbubwg
   -1   101 rrrrbgrwgrwurgwrbbwurbwgwbuguuggwrgbrwrwuuwwrrbgbg
   -1   102 ggrwgbgwubwbrrgruuubgwgggwwwrbgbugwrurggrbrg
   -1   103 buuwggubguwbgrbbggbwwurbwgwggwwrwurwbwubbbbu
   -1   104 ubwgbbwggrgwrrgbrgwwwrwrgguwubrbbrrurgrwuggurgbwwrwur
   -1   105 bggrrggrrrbuburwugguubbburgrbgurgurrwbruuwbrrwrwbrgrurw
   -1   106 wgrwrgrrwurgwgbruwugbuggbbwrurrgbrrwrwubgurrr
   -1   107 wwgwurubbbrrrurubwbbrubwrruwrbbwwwgbbbrburubuu
   -1   108 uguwwuguguwrwwuuuggbgrugubrggwurrrruwubbbgbrg
   -1   109 gubuwgwwgruububwwrrwbrbrwubbwrgwgrrgrwgbg
   -1   110 gwwwugwbwwugrwbwbrubuwwbrrwuwwgbrurbrwbrbbrwguwrrwwbbug
   -1   111 gbbrwwuwgrbuuuuuwbwbbbuuwrrrgggguwwwwwbgwwubgbg
   -1   112 wrbbbbugbuurwuuggggbrrurggrrgwggwgwgguuggbrrrgguuwurbrwrbw
   -1   113 rgrbuuuuuwrgwbbrugbuugububbwwwgbubuwbrurbuwwwrr
   -1   114 uuubrwbwbrgwubgbgwrruuuurugrgbwgbrrggruggrwuwwbrwgbg
   -1   115 gwgugubbwrrwgrburguwbgbbwggugbugwwruwwbgwwrwgubwruwb
   -1   116 wrwwgbwuwbbrwrrbbuurbbwrbubwrbwwugwrgbrubbgr
   -1   117 wgrgwbrrugwuwuurwrbgurbrrrbubuubwgrrruwurbrrgbug
   -1   118 bbrurgrgwwubgbbrwrruwbuuwgrbrrrrruwubbwgwgggbgruuggbg
   -1   119 brbrgburbrburugururrrrruwwbuurbwgrruuwwgbbuwwuugwwgwgbgrgg
   -1   120 uubrurrrubrgrwwwwwububggrggbuggurbbwrbuwbburbugrgwb
   -1   121 rrbbrbbwubrggbgrwbwgwgwugwgwgbbbwurwrgggrurgwurwbrrgrgbw
   -1   122 wwgbuuwruguuwwbwruuwggbbgwwguuurrwwbrurruuguubub
   -1   123 ggwbrggwuwwuwbbguguuggrugwbggugggrrrburguburbwbwrguwgw
   -1   124 buruubbruwrwbwgruwwuwrbuuwugrbrrrwgugrgggbruguwubbrurwb
   -1   125 wwrubbwggrwbuwrrurbbrrwurugbbwgrbwgubrrwwgwrgbg
   -1   126 rbguuwugrgruwbbbwruuurrgggrwwruggruuuurwuwrbgwggg
   -1   127 gbrrubbwurgwrwgubuubruwrbugbrwugwugbgbwgrggwgbbuubgwrb
   -1   128 bubwrwwgurrurubwbubrwuwuggwgrgwrrbwgwbwrrgrrbb
   -1   129 rrubuwbbruuggburwuugwwuubuwwuwurbgwgggwrwrgr
   -1   130 grgggubrgwbwwgggbwrwwrwgrguuwubgwuurgbrurgwgbg
   -1   131 brrbgrbwwuwrwuwwuwwgwrgugwgwugbgguwbbgurrgrwwuwgwubrbb
   -1   132 wrbbwgwgwwurbrrgguwbgwwwwbwwwrwwguggbuugugggubwubrug
   -1   133 rbbgubgwwruubgguwbwruubugruwuwbgwuugwgbg
   -1   134 wwgbuwuuuuugbrugrubgguuwrbgwruggrugbbbguggrburgubwub
   -1   135 buwugbwwrbgbbuugbgwwwuwgugbbubwugwbrrgubggwbrgrbbbrurwuwbu
   -1   136 bwruggrbwgggbugrgurrwurbrgbbgbbwgrwwrgruuwbbbgbuwrgbwuguggbg
   -1   137 wrruwrwwguwrgrggggwburbuubrrwwbruwgrwbbruwgwwggruwwgbgubg
   -1   138 bbbbrguruwrbruuubrwrwurbbbwwbguwwwgrrwgwbgbg
   -1   139 gbwurggbgwbbwruuggggruwurbbubwbrburgwbrbuuuubgbwgggw
   -1   140 rwbrbwgwwubrrrurrrubwbuwubgruguwgrwbggrwwrwubruugrbrggbg
   -1   141 ruurwgubuugwwggrrgrrwbgrbgwuburgugbwgrgurrgw
   -1   142 rrrrubbwbggrgrrbrrwbrbgrgrbgububgrbrbwbubuwrwbwugrgr
   -1   143 rbgwruruuuwrgwwwurrguurubrbburubbbggwwwrbgruwbgbg
   -1   144 ugwugurgwuuuuwguwgbugwgwggbgugrurwuwuurgwrgbgbbwuwuggbg
   -1   145 bwbrggwrbwbbubrbwwbbbgbrubwwrwbbrwubrruurwbbruugbugubwurgw
   -1   146 urggrbgwruurwrguuugrgwubgrbuwgwruwwwbugwuwg
   -1   147 bbuggwubwbggwwbgggwbbgbgbguuurbuwrgggbgbg
   -1   148 gwgugrwgrugrwrbrbgwuubrbbuurrgwwgbbruuwbwbuw
   -1   149 grgugwuwbgguwwwwrrwguurwgwruwgububbrbrggbg
   -1   150 uubugugwbrgububgrgbrwrwbrggbgrbbwrgrububwww
   -1   151 bgwurbwwgrwbwgrwwuguuwrrwrwruruggwgwgwbbbgbugbgbbbgbg
   -1   152 rbwrrggrguurgugwbwuurwwruwugburwrbruuugbuggrbbguu
   -1   153 wgrwgwgbbrgbwuwgbgrwrbbwwbgwrrwgwuuuugruuwwguguww
   -1   154 rugwwbwgwwbuwugrbwrbuwrwuuuggurbwruwguuuwruwwrgrbgbrubgugb
   -1   155 grbwrbbwwubgwbrbbbuurwuugbrwbwbgubbubrwbbwgwgbwwbbuu
   -1   156 rrugbrgrwwrwubrrrggrbrbruugwruuwrwrrwrggruwr
   -1   157 bburubrwuubwuwgubwbuubwbuubrwwggugbrrrurrbgbgbbbubbbwwr
   -1   158 buuurwwbuubgrruuurrwwwgwwwgwgwbgubwbrrbgwurbubwuruguubgg
   -1   159 rbwbrwwubrwururwubrbbgubrrbwwugbuurruwguugrwbbg
   -1   160 ubwwrbrruwwrwubgwrruwggbgwbggugururrugrrwwwuw
   -1   161 rbrwwwbwwgwguwgrgwurgrwububbrgwwuwugbuuuuggbgrbwwrgugur
   -1   162 bgwrbrrwrgrgrrbrwwugrrbubbrgwrwrrrguwwrbggrrw
   -1   163 uwwwrbwbrugrrbubugbbgwbwuubbrrgwrbbbbbbbrgbrwbrbuu
   -1   164 grgrbwugurggbwgwgbbgbbbrgbwgubrwbrgrrrrbwgrubwg
   -1   165 ugrbbuwbgwugbrwwuurrwwbbugruubwgbgwgrbwgbwu
   -1   166 uuwbgbugwrbuggwbbbugbgbwgrgbwguwbrbwrurwwuubggubrugrrr
   -1   167 grgggugbgububgwbgrgwgwbrrgruwrbubgrgrburwwrrug
   -1   168 gruwggbbugbgwwbbruwurbbrbrwwbrrwrrruwbwwggbgburggub
   -1   169 rgbbrrbrwuurubrwwgrguuwburrbbwruwbwrgrggbg
   -1   170 ubrwrwuubwgrruuurgrbgwwwrgrggwruuurrrwbrrrrbb
   -1   171 ggrbbbbuugrgbguurrgrgwgwburrrgwbgubggrwurwguwwgwrwbwrbruug
   -1   172 grrwrwwuugrggwbbwwwwurwbwbbbbgwgwrwburrugbbg
   -1   173 bwbgrurrwwgurwrwurgwwwbbwgrurwburbuwwuuggrgbrubrgwurbubu
   -1   174 urbrrwwbwwbwgbuwruuurrrbwbwrrrwgwrbuuwurbbuugr
   -1   175 uubrbgbubbrrubwrguggbubuwrgwgrggurguuwbrwgwgwwugwbbww
   -1   176 brgbwrbrwwwbrugguuwwwbgbgbgrurwuubbbgwgrugbg
   -1   177 ubbggrrububwbuuwbuwwggrurrugbguwwrgbbgbwwbbg
   -1   178 uubguburggrgggurwrwgbuggrbwuuwwgbburbgbbwuugrwgwrggruuubr
   -1   179 bbbgggruubuuwbruguubgwbrbgwgbwruwbrwbwwwggwwwbur
   -1   180 rbrruburrugrrggurugbuuubuggrbbuwgrbwrwrrbwgburgggwwwuubr
   -1   181 urbrrbwgbgrrgrwwrrbwuuruwubwrbrwrwwruugruu
   -1   182 bbgrguuuwwrwbrugbwwugggwbbbbbugbrwrbwwgwrrwwrubwugrbgwgwrw
   -1   183 wbguggrrrwrrbwrbruwbgggwwbgurgrbuwwgwgururbrurubggrwwbuuwu
   -1   184 wrubrrwggrgggwgrgrbbgwbuwrbwwrugwwwwbwburgbgguruubb
   -1   185 urbugrgbgrbbuwbgbwbuwbwwgwbbrrgggwgrgbgwwrbubrgwbrwr
   -1   186 wurgwrrbbbwrburgbgrubgurugbwgrgburrwwbgwugurwuuuguwrbgrugbg
   -1   187 gbgubuuwgwrurbgrwuuurwbbwggrrwubrruuburugrbuuguuguuugugbg
   -1   188 gbrrbrbuurguwbuwrrgbrrbbgwgwggwbuwgrgrwbbwgb
   -1   189 bbrugrwgrwburbrbburrurgrbggwrbrwrbgwrrrgbrwrgwgugbggwr
   -1   190 wrguwbgbbrubuwwwurgurrurbwbwrrbbggbbgwrrwbuuwww
   -1   191 guuubgrwrwurgbrubbguubrgggwwbwwurggbrwuuwuwwbrwuwbburbwww
   -1   192 uwrubwgwuugbbbwburgbuubwbuwbwwbggwbbbgwwrbbru
   -1   193 rbuwgwwgbrgggrgrwwuurrwggwuwwbrbggwbggbrgbbg
   -1   194 wgwwugbrwurguwuwubugbwgbwurbuwwguubrbbbrgubwgrbrr
   -1   195 gbrburgrruwubwwuggggugrbgbbubbgwuwbuguwrbbrbubgwugbwrr
   -1   196 bgbbrrbuuwgbubrwwrgbgrwwwubrrrrrrbwuurbgwubbgruwrbwgbg
   -1   197 grwrrwwuwwguwgrugwwwrbgbuuugubrwwgrbwwgrbrru
   -1   198 grwwwrbgggbwggrbgbwwrwwwbgbbrgbwuuruwbbugbgbuuuubwbgwgbg
   -1   199 bgbgwrrwugbrbwuggurruurrwuurggrrrbwbwbubwwwbgugggbugwrwgbg
   -1   200 urgrbugrgwguwgwbgbbwbrgwbbwggbuurbrbwwgwwuwwuuwurbwwwrgbg
   -1   201 bgugrbubgwubwuggrrrugwgbgwrgggbwbuwbggrrubbugbg
   -1   202 guurubwrbggwbrubuuggubrugrrbbwuggwuggggubguububbbbgbwuwr
   -1   203 bggwrwwrbwggwgwuruwwbububbwgurwurubruwwuguwugrurwwubwrub
   -1   204 wbwurrrgrgrrwuubbwugrrwububbwwrwgwwwbuwuwrgubrgguwrb
   -1   205 wrgrurgbbrwbugwgwwrbugbrrggggrrwrrrrrbruurbggggbg
   -1   206 gwbwuurbgrubrbrugbubbubbwuurbbrwbrwrwubggwubgbburwbbbrwwbg
   -1   207 wbuwgwgurgubbbuurwgrgwgubwgwwugugwrbuwuuwgbg
   -1   208 ggwgrbubuwggbgwbwbrwuugwgrgbrgbggwrububwgwuwuwbgubbgbg
   -1   209 gguwrbbgbgurbggwwgbugguurubruwrgwrguurgbg
   -1   210 rbbggbrbuggrgruwgwwrguguuwgbuwrwrbuwgwbwwuw
   -1   211 uuwbgrwwubwwwguburgbrwwubggwrgwbrrruwguubu
   -1   212 uubguwwurwrwwrgwrbwgurgubrwgwwrurrgwbbuuwrbubbbwu
   -1   213 buwbwuwbbwbbbbwugbuwwuuwrrgwbwugbwwuguwrwggrubwwuwggrg
   -1   214 wbwwrwwwururbbrugbgrbbwuuuuurwrgwrrbgrgubuugrrwwrgbwruub
   -1   215 gwrwwgugbggwbrgbwbrbgggurrrwbbuuwrbwrwgrguuwbrruguwrgbg
   -1   216 gggwurgwwuubgruggugbubbguwbgrguwbwwrubggguruwrrbugrgbg
   -1   217 ubwggggguguuwuruwwruuugguwrggrrurbrgrbgbg
   -1   218 rwuuuwgbggruurrwwgwbrrggwbwbrugrugrbrbggbbwbrgwubggbwb
   -1   219 uwugwuurwbrguuwbbgbrbwuwgwrruuububwwrrgrubwwbrgwrggbgbubbr
   -1   220 wggrbuuuuwuuwgbrbbubbuugrbbgbbwbrbuwguruwbrwrwgrgrrurgbg
   -1   221 rggrrwgguguwwgbgwbbrgbubuwgrurguugguurgwwwwgrgbg
   -1   222 wubgbbbuwrubuuruggbwwrrwrggrbrgburbrbuwgbuwwgbg
   -1   223 ugwrubgwwgwbuwgwurwuwrrwbgbrrbwrwrbggbbgwgwbrrggbg
   -1   224 grgwruuwwrugurrbbuwbwubrbrwbrbbrbguugrrrgbwgrrggugw
   -1   225 ggrgggbwrgbuuurugurbwurwrrrgwuburrbggwwbubwgbg
   -1   226 wgggruugrggurwgubruwbbuwbwruuwgbrugrbggrgbrbrugugbg
   -1   227 wrrrwgggrrrbrwrbrgwrgwrurgrgggwbgwrbbbrgugwwgwguu
   -1   228 rbgggwruwugugwrugburuwgrubbrrgubgwbbrgwbgggbbwgguwgbrw
   -1   229 buwwbugwuuwgubuuwbbgugrwbwggrgbruguugwgwwwwrruwbg
   -1   230 uwwrwrbgbrrrwgbgugwurgwrbrwgurburrbuwgruuwurbbugbwwrrrbrgbg
   -1   231 bgururwbgwubwwbrrurgugurbuubwggrrrguubugwbwgbg
   -1   232 uwuwbbwrgwubrbuwwrwbubwggwwrgwubgrbwuwbguwg
   -1   233 grruurwrrubrubbruurgrgrbwbgbwgurbbruwgbbruubrgrwu
   -1   234 wuwrrrwubggubbwgbwbbbrbwbgwrrgbrrgubrguuruwgrbgw
   -1   235 rwbrugugubwbbwbwgrgwuubrbbwuwwuggrwwgugugubr
   -1   236 wugubwbgwwuguwrgrggwwgbrwgubgurwbrubgwrruwgruwwgbgbg
   -1   237 wugugubuurwbrgrbrwuuubruuuurgurbuwbwuuwbrrww
   -1   238 uwwrwrrwuugggwbrwrwggrbubbuuwbwwwwbruwuwwrgbgbg
   -1   239 burrwugbwrgbuwrugrbbbgubwuggbgrwbwubrugrbu
   -1   240 gbuubrubrwwwgrugrgugrguuwwrwwruurbwgwbuuurbbuuwubrb
   -1   241 bbbgrbbbubrwuurgggrbwruruubrurbwwwruuuuwggrgbru
   -1   242 ruwwwbwggwbwugugrurgwbubwrubgggrubwrururrwuwuuu
   -1   243 wrgwuwgwrwwuwgbgbuuruwurrrgggwwubwbgbrgbg
   -1   244 uwrrrggrbwbuubbbrrgbrguwbwwuguwrubwgwgwrbwurwuugwgbb
   -1   245 ugwrrggbgbruggbggugbbbuwruubrugbgrrwbwrwbwrrbgu
   -1   246 rurwugugrurwgwgrwgbuburguguuwuurbgbugguwugurrurgbg
   -1   247 wggbwrgrgwuwggbuurbbgugurbwubrugrbburgugrbrggwb
   -1   248 gbugbbgbuwbrrubwgrwwbwgrrbbuurbgrguwguuubwb
   -1   249 wrbbrwwuguurrwbrbwgurbuwrugubgwbgbgbubbggbwr
   -1   250 rgwrggbwubgubruurbugugugurrbrwggrgwbgbwrgrgru
   -1   251 rbububggrrbbbubbuwgrwuurbburubbbwguuwubwwburrrwu
   -1   252 uurrruubwggggrrbruuuwgbgrbbbwrbrguwgbwgwwrwbr
   -1   253 bubwgrguwrurrwwurrgwrbwbwggrgwggwruwgrrguwbggbbbguurwbrbru
   -1   254 ggrugubwuwrwggwbubguugrwgubggbbwgugbwwgbguwbuururrwurgg
   -1   255 ubrrrbuubugururuugggruwbbwurggwwwruggbwwwuu
   -1   256 ruurrbwrrurwrubbwwgrrgbgururgwbrruwgrwwwugwbuwgug
   -1   257 wrrggurwubrgrrwburggrbbuwgrrgbuwbggrguwuwgwrwrrgwrurbbgbg
   -1   258 wrwbwbuurgugrugbwwbguuwwgwbuggrwuurwwugbg
   -1   259 rbrbrbwggbbwwbbbbbuggwbbubuguwwuugrgbrruugggbbwbwwrwgbg
   -1   260 rwrwuwrwgurgugbbrrwwwugrbbwbrgbugbbgbrurrgbg
   -1   261 buuubwrgwwbrrwbwuwrubruggbwrbruwggrgrgwggrwggugwbbgguw
   -1   262 urggwbugguugubguwruwrbbgbgbrggurrubuwrgbg
   -1   263 wgbwggwbrwgbgruuguururrbbrgrwgwbwubgrrwguwgwuwuububgbg
   -1   264 gwwwbgurgbwrgwbuugurwbuurrrwrgrggggbwubwwgbg
   -1   265 bgbuwbgwubgbwgwrruubrrwwrrruwuggrgbrrubbbwugwbwrbgwgrbuu
   -1   266 ururubwbugbuwrgrwgburrwuurgwugrgbbgguwgguruwwbuuwgrwbrrbb
   -1   267 rgurgruuwwwuubbbbwrrrwwrrrrgrburrguruwgggwwwugbg
   -1   268 bgrbwwuuggrbwgwbwbwubuwrbuurwugbbbubrruubrgbg
   -1   269 uubugurrgbrguuruwurrwgbuuuwwuwbrrubgbgwugwgwbgbwubwwgr
   -1   270 gbgwugwwrgwgwuwwurrggbrugrwrgugugbbbwggbg
   -1   271 rbwuggbwguruggbggugrubwrubwwgrggbgguburuubbrrururwubrgggbg
   -1   272 bgrwuurubggwrrguguwubbguwgrwgbgrurwugrwgww
   -1   273 rrwuububrbbwgbwrrugbwbwuwugruwugbuwrbwgwrgw
   -1   274 bbggbguwbbbuwugbguuuwgbrguwwgwwbbruburgbbbbrurrwburuwggbg
   -1   275 bgurwgrurbwwurwrgggwrgbubugwuwbbbrgruuugrrrruggbrggbg
   -1   276 wrgwubrwwrrbubwuruurbbgbuwgwgurwgwggubrwrwbruuuwrug
   -1   277 ggrbuggbbbwrubwgwubrbrbburbgbgwrbwgwgrgggrbrwrgugruubrbb
   -1   278 rbrbbruwuugrrbgrububrgrggrurbrbrwbgwbrbwuguwgrwwwub
   -1   279 wgrrbgugwurrubbwrwgbuggrrurbgrrbwwuuwurwggbbwwruugru
   -1   280 brwuuwwbrrrbggbuwgbbgwrugurwuwbwgubbrgrgwgbbbgrugbg
   -1   281 uguwuburgbrggrrbubgurwgrbgrwuwuubrbrwrwruwwwbwgwrbg
   -1   282 rbbubuwbubbbbrwubbwrbugwrwubbwrbbgugbgwrbwuwuwgwrw
   -1   283 uuuubwbrubwwbrbuwbrgugwubrrurbgugugrbrbbrwggrwggrur
   -1   284 gguuugwwbwrbrgwurwwurruwbgwurgrgrbrgbwubggrwgbg
   -1   285 gggwrugrbwwugwgwuugugwbugbwwggugguwguugwwuwrbrgbbrbbrwurgbg
   -1   286 ubbuugbgbubwbuwwgrbgrrgbbwbbwrrgbugugwugwgggbg
   -1   287 guburbrrbrwubbgguguurrwuubrbrwrgbrbguwwbrrrb
   -1   288 bwubgbwwrwbwbgbubggwwwbgbgurruugwuruwugbugwugurbugrgbwwbgbg
   -1   289 uubrgrwwrrgrrbubrrbwggggrwruwuurrbbrwrgbwrugwbwgbg
   -1   290 uubbggbrwugwgbbgbrbrgbrggruwrubbwwwuurgububuwbrrurubbugbg
   -1   291 wwgwgwgwggrwruuwugbbrbwwgbgwugbgwwbgbuwbubuuguwwgruwu
   -1   292 wrrbruruugbugrwurbwrrwuwuguurgrbugrrgbwurrggugbg
   -1   293 gurrrwruwwruuwrgrbgwbbrurgwwwwwrgrrwrubwgggbgwbburrbguww
   -1   294 wwrwrubgrrwurbgbbbubrgrwbwrbrgbuwrubuuggbg
   -1   295 grbwgwgrbrbrwwbruwgrubgubuwrrrrgbbrugbubrwguuubbbrwgbg
   -1   296 brwuwwwrgggrgubruguurbwbrrrwbwrgggbbggwrgugbbbgurbggrwurwg
   -1   297 wrbbrwrggbbguugwugwgrrguwugubbbwgwwuggggbubuwwbwgguwwrrwbu
   -1   298 gbgwbrwrbgwbwbwwgwgbuwbuwbgbrbrbgbbbrggbg
   -1   299 bububbwrwgubgwwggbruggbbrwgbbubwbwwbwbgbwwwwwwwbrurwrr
   -1   300 rrgbgrbbubrbwwbgrrggbgrgwubgbugurwbgurgwwbuguwwgbg
   -1   301 bbbggburbwwwwugwuubrwbgwbwbgruwbrwubrrrggrrwrwwwrrgwbgbg
   -1   302 wwwurgbbuwgbgrurgbbgwguuuuuwwwrubugrwuwwwbrwwbggrggbg
   -1   303 urrrubwburgrbwgburgbbgrgrwrggrrbgubwugbg
   -1   304 rguwrwgguwuggwrrwurwbubbuwrbwrrrgwrugrrubburrrbbrbgbwgbwgbg
   -1   305 buwurrbgwuruwbuuggbwbggbruggurguuugrrbgbg
   -1   306 guwuubgrbwrwwbuuwuugbbbrwbuubuurugrwubrguuurwuuwrrbuwrgbg
   -1   307 bbubgggwuugwrugbubbguwwrgubwrrgburgwgurugbbbgubwrgbg
   -1   308 ruruwgurggguwrugubgrwrrrwggwugugbwgbgwrgbbuuuwrw
   -1   309 rgruuwugwugugbgwwwguruuguuwurururbrbbuwrwurgwubgbg
   -1   310 ggwgguuugwwwrbuuuurbbbwwwruwubgbgrgurbwugwubuwwwggg
   -1   311 gburgwuwrbbrwgwwgbgbwurrwbgbwbwrgbgwrrbrgwwgrrwrgggruugrgbg
   -1   312 wbbguuwuurrugbwuwuubwbbuuwgbrgbwwbgwururwb
   -1   313 gbwwwgbbggwwgbwurrgrbwrrbubwwgwbgwwrwwbwggwbrwgbg
   -1   314 wwgbwwuubwuwrbugwrrugbguwbbwgrwbrwbggwgbgrgb
   -1   315 rbbgguubbwwbubgbwgugugwuburwrwgwwuwurrbrbuwurrgggbgrbbwrg
   -1   316 urwgrwrbrgggrbuugbbruwubbgrwrgurbwwrbgwbrwrgbbgubbbr
   -1   317 bubuwwwwrubburgwgwwubwuwbubruwubrwwgggrgbubwuwubwuwuurgrub
   -1   318 wbbgrurrwbuwrgbbbrrguwwurwrwrrrwwwrbubwguguubbruwbrurrgwrgbg
   -1   319 uwubwwggrurbrwguubrrwgrwugrugwbubwbbrbuubggbg
   -1   320 bgwuwruugwwwwbbwbrugurwguwugwrbuguburbbgrgbrburwwrugu
   -1   321 urugrwwgwggguwgbrbwrrwrggrwuuguruwurgbuubrggbwgbgrruuu
   -1   322 wurggrrurubwbuwwgbgwbrbuwrwuurrbrrbrrwwwrgbg
   -1   323 wwbubrgbbugruguuuruggrwrwgburwwwrbwbrubruwwubgwwbwgr
   -1   324 wrrrrggrubuuuuuurggbwwgwbgwubbgwwbrrbbbgrbgbwubwbugbg
   -1   325 wbgrrgrbwwbugbbbbgbgrugbrbugwuwubuuwgwuubwgbgwuwgbrrww
   -1   326 bwgrrbggbgwrwugwruurwbwugwugwrurrwbrrguwrwwb
   -1   327 gbgurggugggubwwgwgbubggrgguubwbururgwbgbubbbwr
   -1   328 gbuubwgugubwwgwguuggwbgwbrwgbrrggbwwbgbg
   -1   329 wwwgrbrwuuuwgwwgugbbrgbgbbwgbgbrwguwwgrrububgwwgbbbbbb
   -1   330 uruwggrbrrwuruburrbwrwwwgwuwwwwuurwgwugrbwwuubuwg
   -1   331 rgwugrbruurgrrwbguruwwgubbrwrwbgubgbuuubuugbggwrg
   -1   332 brgwgruubuuuuggwuwuggrwgrbgbbwwuwwrgurgwwwu
   -1   333 bgrrgurrgwbbrrrwuugugubwgugrruuwwuwrwbwbgb
   -1   334 gburggbrugbbbubwwwruwurgwubbbubrburgbuurgbggbgb
   -1   335 bbgwbbbwrbuwurgbuuurbwgbbgguubuwgbguggbwbwrguwgrug
   -1   336 wuguwwwubwrrbbwuuwbgbwguwbgbuwubgbubbgrbwubwrburgwg
   -1   337 wrwrgwurbgwwurubrbwgrgugwwbrrwbwwwugrrrwwbrbruggur
   -1   338 uwgurrubgburrguuuubuuuuggwrwgwrbbruggrrwggbgubg
   -1   339 wgrwggrwrwwwwbbgbuuurrrbggbgugurrrrgrurggg
   -1   340 ubwgwbgburrbguuguwruubrbggrbggbbwuwubrgggb
   -1   341 rwguwrurburbwwubuggbbbubrugrbbbbgwggwrrrwrrgubgwwgww
   -1   342 ggguurrrgburgrbgggbwuubgrruguwwugrggrwrbgugrbbbrgrgu
   -1   343 bbrrburrbbbrrruurgburgbwrbuwuubbugwwuubwbrugw
   -1   344 brbwwwuugbggwurgbwrwrrwurrurwwgggurwwuububbwbwugbuubrr
   -1   345 grwwuuwuwbgrrwgbrwrwbbgggrguurgwgbuubwbgrgruwbubwurbgwggbg
   -1   346 gbubgbwbururrbwrrbuurwrburrgrgrgwwrrurrrrbgbg
   -1   347 guurbguugrgbbugwbbwbbuwwbruuuuruwgburuuruwggbgrwrbrwg
   -1   348 wwgrbbuwbuwuubrrbwwrbrgugububrwggrugbwrrurugbugrwgbrgubbub
   -1   349 ubwwrgugrurbbbbwurwrubuwrwgwwurbuubuwbgwuwubwubgwuuuwuwwbgbg
   -1   350 wgwgbgrwgrgrubuurrwrgrwwwbgbubbwwbrgbgwwrrwurbwrgwwgbg
   -1   351 rrubwubbgggrwrguguguwggwguwrwrgwwggrgubrwbrbwwugwr
   -1   352 gbrrrwuggbgwugurubrgbwrgrbwubbgbuwbggbgrwbrrbbrwggbug
   -1   353 grbrbrbbwgruurbbrgbrwgurbubuuwruurbwurbgbwwwbuwugrg
   -1   354 brbbrubbuguubwgugwururwgbwubguurgwbrbbggwurrgrwubb
   -1   355 wbgwgbwgbbggrwwbubwurbuwgwwbuwbrrwwgrwrrgbuuuguwwbubwugbg
   -1   356 urbgbbuubgburwgrubguggbbwwggburgrbuuurgrbuuub
   -1   357 grbggbwwuggwrbbgrwuwbrguwwwbwrbbbgrwrguubrgrbrwggbbrurgbg
   -1   358 rrbwwgbwwrrbrgwbwururrwgrwggbwrbruubrrgurwurggrgubgggubw
   -1   359 bgbrrrgwrbuurruuuububwgwuuguggrrbbwbggurrgbgbrgrrwggbbgb
   -1   360 ugbbbwuwbrwgbwbggubwwuuwwrgrgwrburgbwbbwbuubbrwgrrgwr
   -1   361 buubrbbbrwgwuurwggggubgrggbrwrbgbbbbbwrruuuggbg
   -1   362 ubuggbwgbrwrgguguggwurrwrrwubwguurwbwgwbrwrubggubbw
   -1   363 bububuurbgrwrrwrbrurruguwubrbrggrwrrwgwurwbguu
   -1   364 rubbwrwrwrrgrubwwgbruguburbrbwwrguggrbbwubugrrgwuwgrggbg
   -1   365 uwrrruugwgwbwugbrwrbrrburubggbrubbgbguwruwbwrwubgwggwbbugbg
   -1   366 gwugrguuwwbbgubbrgguruwwwbguuuuwgurwuwugubbgbg
   -1   367 wurrwubuubuwuwbuurrgugwuggbgwrrwbgbwbwguugggrwwgugb
   -1   368 wgwgbwwuggruguruuubgbwurrwbbbwwbrugwbgggbg
   -1   369 wrwubrubruuubrrgwugbbrguwugrbgwruwburbwuwbrgrubbrwubrrbub
   -1   370 wrwuwubruggugrruwbrgbbbgbgbuuurwbwrwgwbuwuugwbbuwwwrbggw
   -1   371 rruwbuuwbrbwrgrggwbuurrugruububbwgwbgwggubgubbgwgubgbg
   -1   372 buwwgrgwurgbgrbgbgbbrrggbggguwuwgurbwubbbrwbwwuwbu
   -1   373 wwbrggrgurwruubbuwwurgbrbbrbuugwbrbwburbgugb
   -1   374 bgbgwugwrbburbrwwwgwuwgurwruguwgruuguwgruwbgbwugwb
   -1   375 uwwgwuwgggwbrwggbrbbguwrgrbrggugwrbgbugugwrwurrbubb
   -1   376 rgbrgrrrwrgrwuwbrrurugurbgbwwwgbuwbrbuugwgrrbwbrgbugbg
   -1   377 gwrwgbgrrgbbbbggrrwugbwrwggurbrwrwwbwggubgr
   -1   378 bwbwrbrubwrwuwrrbuwbrguwrgbbuggbubrbugugbrbbwrgrurrgbg
   -1   379 uuwbwrgubbguubbbguuwugurrurwwgubrbgwgbwrrrrwwbwuuuuruwgbg
   -1   380 rbwrgbgbrbuugrwguguuwwuwubbrgggbgwrwrrwgwubww
   -1   381 bwwrbwrbbwruubuwrgrbgbwwwuwgurrurrwrguburubuwgbg
   -1   382 bgbrrbbrwbuwwgubrwubrugurwguwgugwbwwrubwbbubrgbwrrbwbuwrrgbg
   -1   383 bggbruggbwgrwugurbwwubuuuwgbgwruburgbrrwbwugbg
   -1   384 rwguwwrguwrggggwrgwrgwwwbwgrggwrubuuubwuuggwwugrbwburrw
   -1   385 uwrgbgbbgbbwurugrwwgburgubrwuuwbbwwwbrrrggugrruwugugbwg
   -1   386 uuwwbgruuguwgbbrrbubwubbgubbgggbgrwuuwrrgggru
   -1   387 ggbugwurwguwwgrbbgwrurgrbbgrwrguwwrwwurguwgrbrwguugwbrrgrg
   -1   388 bwrwugburgbbbrbwuugggrrgwrubrrrgbwrrbrwurrrwbb
   -1   389 wbwbgrrrrrbbwbbrguguwgururgurrwgwgguwburggggburgwguu
   -1   390 uuurgrbgwwrwwwbrurgbggubrrgwwwgbwgbuuwbbbwwurrbwbgbg
   -1   391 brubbguwgrugbrbugwrwwbguuugwrwrrwbrrgwbwwwbgwwubwbuwwurrb
   -1   392 wbrwbbrurgwguubwrwrwbbuwwgubruwrrgbrugrwwrbubwgbbu
   -1   393 guwgggburrwwbwgwggbrgbwrrrrubbggbuurguwrbbgrbwwbg
   -1   394 bwuwguuwwugrbgwgwubbguurubbbbbwrwggbggwurrugbb
   -1   395 brwgurwbwrrgbguwbubrwgrbrgwwbbuwwrburgbg
   -1   396 ubuuwgwgruugrurgububrgwubbuuwbwruwbgbgrwurbugbg
   -1   397 wuubwwugrwwbgbbubbguwgruwrbgwguurgbrubgguwu
   -1   398 gbwrwggrrrwwgurwurwwruwbuburrgurrwwurrbbgbg
   -1   399 rbwbrruwwwwwgbgbburrrrbwurwbugbrgwwgwrwwurbuggr
   -1   400 ugwggugubuuuwuwgubggrwgrugwrwubgwgbbugrwgbg
   -1   401 rwbggrbruubbbwgrwuwbrwrwbgwrbbwrbrwgggugubgbwugwgugugbruub
   -1   402 gwrbgrrbbburwgwwbrurbwbwwuguwrwrbgurburwbbrbgugwrbu

diff --git a/2024/19/solution.rs b/2024/19/solution.rs

@@ -0,0 +1,44 @@
   -1     1 use std::collections::HashMap;
   -1     2 
   -1     3 #[path = "../lib.rs"]
   -1     4 mod lib;
   -1     5 
   -1     6 fn count_ways(pattern: &str, towels: &Vec<&str>, cache: &mut HashMap<String, usize>) -> usize {
   -1     7     if pattern == "" {
   -1     8         return 1;
   -1     9     } else if let Some(count) = cache.get(pattern) {
   -1    10         return *count;
   -1    11     }
   -1    12 
   -1    13     let mut count = 0;
   -1    14     for towel in towels.iter() {
   -1    15         if let Some(tail) = pattern.strip_prefix(towel) {
   -1    16             count += count_ways(tail, towels, cache);
   -1    17         }
   -1    18     }
   -1    19 
   -1    20     cache.insert(pattern.to_string(), count);
   -1    21     return count;
   -1    22 }
   -1    23 
   -1    24 fn main() {
   -1    25     let mut input = lib::iter_input();
   -1    26     let mut cache = HashMap::new();
   -1    27 
   -1    28     let line = input.next().unwrap();
   -1    29     let towels = line.split(", ").collect();
   -1    30     assert_eq!(input.next(), Some("".to_string()));
   -1    31 
   -1    32     let mut sum1 = 0;
   -1    33     let mut sum2 = 0;
   -1    34     for line in input {
   -1    35         let count = count_ways(&line, &towels, &mut cache);
   -1    36         if count != 0 {
   -1    37             sum1 += 1;
   -1    38         }
   -1    39         sum2 += count;
   -1    40     }
   -1    41 
   -1    42     println!("part1: {}", sum1);
   -1    43     println!("part2: {}", sum2);
   -1    44 }

diff --git a/2024/19/test.txt b/2024/19/test.txt

@@ -0,0 +1,10 @@
   -1     1 r, wr, b, g, bwu, rb, gb, br
   -1     2 
   -1     3 brwrr
   -1     4 bggr
   -1     5 gbbr
   -1     6 rrbgbr
   -1     7 ubwu
   -1     8 bwurrg
   -1     9 brgr
   -1    10 bbrgwb