summaryrefslogtreecommitdiffstats
path: root/2020/day7
diff options
context:
space:
mode:
authorYigit Sever2021-12-12 01:24:32 +0300
committerYigit Sever2021-12-12 01:24:32 +0300
commit4bb6f8d06c0e384f3394012b1d48da58ed28cc5e (patch)
treed6478c85c0488a1059567ccd2882cb10039c2546 /2020/day7
parentae3853b6e8ab02023ccd74baac6dc177b1ee879a (diff)
downloadaoc-4bb6f8d06c0e384f3394012b1d48da58ed28cc5e.tar.gz
aoc-4bb6f8d06c0e384f3394012b1d48da58ed28cc5e.tar.bz2
aoc-4bb6f8d06c0e384f3394012b1d48da58ed28cc5e.zip
2020, tracking
Diffstat (limited to '2020/day7')
-rw-r--r--2020/day7/haversacks.py35
-rw-r--r--2020/day7/input594
-rw-r--r--2020/day7/inside_shiny.py45
3 files changed, 674 insertions, 0 deletions
diff --git a/2020/day7/haversacks.py b/2020/day7/haversacks.py
new file mode 100644
index 0000000..4f7292d
--- /dev/null
+++ b/2020/day7/haversacks.py
@@ -0,0 +1,35 @@
1import networkx as nx
2import re
3
4bagtree = nx.DiGraph()
5bagremover = re.compile(r" bags?\.?$")
6numremover = re.compile(r"^\d+ ")
7
8with open("input", "r") as baglines:
9 for line in baglines:
10 (miniroot, child_str) = list(map(str.strip, line.split("contain")))
11
12 miniroot = miniroot.replace(" bags", "")
13
14 children = list(
15 map(
16 lambda b: re.sub(numremover, "", b),
17 list(
18 map(
19 lambda a: re.sub(bagremover, "", a),
20 list(map(str.strip, child_str.split(","))),
21 )
22 ),
23 )
24 )
25
26 if "no other" in children:
27 continue
28
29 for kid in children:
30 bagtree.add_edge(kid, miniroot)
31
32lengths = dict(nx.all_pairs_shortest_path(bagtree))
33
34# we don't count the shiny gold itself
35print(len(lengths["shiny gold"]) - 1)
diff --git a/2020/day7/input b/2020/day7/input
new file mode 100644
index 0000000..820cca0
--- /dev/null
+++ b/2020/day7/input
@@ -0,0 +1,594 @@
1muted lavender bags contain 5 dull brown bags, 4 pale maroon bags, 2 drab orange bags.
2plaid aqua bags contain 1 posh violet bag, 5 pale yellow bags, 4 bright salmon bags.
3wavy lime bags contain 3 vibrant indigo bags, 1 posh gray bag.
4pale coral bags contain 5 mirrored olive bags, 2 posh salmon bags.
5faded chartreuse bags contain 1 plaid blue bag, 4 clear salmon bags, 5 muted teal bags.
6vibrant indigo bags contain 4 pale red bags, 1 vibrant violet bag.
7vibrant salmon bags contain 1 dull crimson bag, 5 dim coral bags, 4 pale salmon bags, 3 pale fuchsia bags.
8light yellow bags contain 5 clear beige bags, 3 dotted beige bags.
9muted plum bags contain 5 posh silver bags, 3 pale turquoise bags, 3 faded chartreuse bags.
10mirrored indigo bags contain 4 pale tan bags, 1 posh indigo bag, 3 shiny salmon bags, 4 wavy indigo bags.
11pale indigo bags contain 3 dark white bags.
12plaid indigo bags contain 4 mirrored teal bags.
13shiny brown bags contain 1 striped gold bag.
14drab violet bags contain 1 drab magenta bag, 5 posh orange bags, 1 mirrored brown bag, 4 wavy salmon bags.
15pale olive bags contain 2 light black bags, 2 faded tomato bags.
16dark teal bags contain 3 striped fuchsia bags.
17plaid white bags contain 4 shiny salmon bags.
18muted gold bags contain 5 faded lavender bags, 3 striped aqua bags.
19pale cyan bags contain 3 muted tan bags, 5 bright purple bags, 1 posh blue bag.
20pale tan bags contain 3 bright teal bags.
21bright aqua bags contain 5 plaid magenta bags, 5 muted lavender bags, 4 dim turquoise bags, 1 shiny turquoise bag.
22dark gold bags contain 4 dull indigo bags, 5 mirrored orange bags, 5 bright teal bags, 1 dim gold bag.
23muted salmon bags contain 3 muted gray bags, 4 pale salmon bags.
24striped plum bags contain 1 dark indigo bag, 1 vibrant violet bag.
25posh yellow bags contain 3 shiny tan bags, 4 dull lavender bags, 5 pale yellow bags.
26plaid lime bags contain 2 bright brown bags, 4 dull lavender bags.
27mirrored gray bags contain 4 mirrored teal bags, 3 muted indigo bags.
28muted olive bags contain 3 dim fuchsia bags, 2 dim salmon bags, 4 shiny maroon bags.
29dotted blue bags contain 4 plaid orange bags, 5 faded black bags, 2 muted black bags, 5 mirrored lime bags.
30wavy beige bags contain 5 dark aqua bags, 3 mirrored lavender bags, 3 drab fuchsia bags.
31shiny indigo bags contain 3 wavy black bags, 2 dull plum bags.
32drab lavender bags contain 4 mirrored chartreuse bags.
33vibrant tomato bags contain 3 wavy white bags, 1 dull plum bag.
34plaid teal bags contain 3 mirrored bronze bags.
35pale chartreuse bags contain no other bags.
36muted coral bags contain 1 striped lavender bag, 5 dotted crimson bags, 2 faded tomato bags.
37faded aqua bags contain 2 bright plum bags, 3 faded gold bags, 1 mirrored bronze bag, 2 dull lavender bags.
38pale brown bags contain 1 clear salmon bag, 4 drab tan bags, 1 light orange bag, 1 light silver bag.
39drab orange bags contain 3 faded beige bags.
40pale blue bags contain 3 pale plum bags, 3 dotted green bags, 4 dark lime bags, 5 clear beige bags.
41dull purple bags contain 5 posh aqua bags, 1 muted blue bag, 1 bright gray bag, 1 muted chartreuse bag.
42bright silver bags contain 5 dark turquoise bags, 2 dark teal bags, 1 muted tan bag, 3 vibrant tan bags.
43dim silver bags contain 4 plaid black bags.
44faded violet bags contain 5 dark maroon bags.
45pale maroon bags contain 5 dark maroon bags, 4 drab chartreuse bags.
46shiny green bags contain 1 bright chartreuse bag.
47vibrant crimson bags contain 3 dotted red bags, 2 striped violet bags, 1 light bronze bag.
48clear lavender bags contain 1 faded teal bag, 5 clear cyan bags.
49mirrored red bags contain 2 dim gray bags, 2 drab orange bags, 4 muted purple bags, 3 muted white bags.
50striped green bags contain 2 light purple bags, 4 light gold bags, 3 posh magenta bags.
51dim yellow bags contain 1 light crimson bag, 2 muted indigo bags.
52dotted orange bags contain 3 wavy salmon bags, 1 dim fuchsia bag.
53vibrant gray bags contain 1 plaid brown bag, 5 mirrored black bags, 4 plaid olive bags.
54mirrored silver bags contain 2 striped magenta bags, 3 striped coral bags.
55pale magenta bags contain 4 posh tomato bags, 4 plaid blue bags, 2 shiny gold bags, 3 faded beige bags.
56vibrant black bags contain 4 dotted brown bags.
57muted violet bags contain 1 clear tomato bag, 1 striped beige bag.
58clear salmon bags contain 1 drab chartreuse bag, 4 dotted beige bags, 5 light crimson bags, 3 dotted orange bags.
59posh indigo bags contain 3 mirrored teal bags, 5 drab gold bags.
60wavy black bags contain 5 dotted purple bags, 5 plaid chartreuse bags, 3 striped gold bags.
61mirrored lavender bags contain 2 dim black bags.
62shiny maroon bags contain 2 dotted beige bags.
63drab magenta bags contain 2 dim yellow bags.
64pale orange bags contain 1 shiny purple bag, 5 striped turquoise bags, 2 light crimson bags.
65shiny beige bags contain 5 clear white bags, 2 striped turquoise bags, 4 pale yellow bags, 1 muted black bag.
66striped cyan bags contain 2 plaid yellow bags, 2 clear teal bags, 3 wavy olive bags, 4 posh violet bags.
67dull cyan bags contain 1 striped salmon bag.
68vibrant green bags contain 4 dull coral bags, 4 drab yellow bags, 4 dark cyan bags.
69wavy cyan bags contain 5 light salmon bags, 5 dim blue bags, 2 pale green bags, 1 faded indigo bag.
70drab plum bags contain 3 dark magenta bags.
71light aqua bags contain 4 bright bronze bags, 3 wavy lavender bags, 3 dull cyan bags, 2 bright green bags.
72pale plum bags contain 5 clear plum bags.
73vibrant silver bags contain 1 dim lavender bag, 4 bright teal bags.
74wavy white bags contain 1 light crimson bag, 4 wavy salmon bags.
75shiny chartreuse bags contain 2 plaid gray bags, 5 mirrored white bags.
76dull chartreuse bags contain 1 dull cyan bag, 3 striped white bags, 4 posh indigo bags.
77clear magenta bags contain 1 plaid coral bag, 5 light plum bags, 1 bright yellow bag.
78muted white bags contain 2 dull salmon bags, 5 bright turquoise bags, 3 wavy gray bags, 1 plaid black bag.
79dull brown bags contain 3 faded lavender bags.
80muted turquoise bags contain 4 mirrored plum bags, 4 mirrored brown bags, 4 drab salmon bags, 4 mirrored tomato bags.
81posh tomato bags contain 2 drab orange bags, 4 dim lavender bags.
82shiny fuchsia bags contain 3 dull black bags, 5 wavy coral bags.
83dim gray bags contain 3 drab gray bags.
84striped olive bags contain 5 light purple bags, 5 wavy yellow bags, 1 striped fuchsia bag.
85muted maroon bags contain 2 bright white bags.
86light tomato bags contain 1 striped indigo bag, 5 plaid plum bags, 4 clear indigo bags, 4 drab tan bags.
87plaid violet bags contain 2 dim coral bags.
88striped chartreuse bags contain 2 shiny gray bags.
89mirrored white bags contain 4 striped beige bags.
90dim beige bags contain 3 wavy bronze bags, 4 vibrant silver bags, 1 striped white bag, 2 dark plum bags.
91striped violet bags contain 5 dull teal bags, 2 vibrant red bags.
92drab green bags contain 1 striped olive bag, 2 light salmon bags, 1 faded cyan bag, 3 vibrant fuchsia bags.
93clear lime bags contain 2 plaid coral bags, 1 light lavender bag, 4 posh salmon bags.
94striped indigo bags contain 2 pale maroon bags, 5 dotted aqua bags, 3 drab gray bags.
95dim blue bags contain 5 faded bronze bags, 4 dark blue bags.
96faded fuchsia bags contain 3 muted fuchsia bags, 1 light orange bag, 2 striped beige bags, 1 dotted red bag.
97plaid red bags contain 5 pale maroon bags, 3 dark beige bags, 2 striped fuchsia bags.
98drab silver bags contain 1 dim salmon bag, 2 shiny salmon bags.
99dark chartreuse bags contain 1 dull aqua bag.
100clear chartreuse bags contain 5 faded brown bags, 3 dotted aqua bags.
101plaid silver bags contain 5 pale red bags.
102wavy chartreuse bags contain 5 mirrored red bags, 1 dull teal bag.
103clear gray bags contain 5 striped salmon bags, 5 plaid silver bags, 1 clear black bag.
104shiny white bags contain 1 shiny gray bag, 5 vibrant gray bags.
105posh coral bags contain 2 muted white bags.
106light red bags contain 5 muted indigo bags, 1 wavy fuchsia bag.
107dull fuchsia bags contain 4 light plum bags, 4 faded red bags.
108dotted gold bags contain 1 plaid brown bag, 4 dotted aqua bags, 2 pale purple bags.
109faded orange bags contain 3 dotted beige bags.
110bright coral bags contain 2 dark cyan bags, 1 wavy tan bag, 1 vibrant yellow bag.
111striped brown bags contain 5 light yellow bags, 4 dull indigo bags, 4 clear maroon bags.
112light fuchsia bags contain 3 dotted gray bags, 1 striped orange bag, 1 mirrored olive bag, 2 wavy fuchsia bags.
113dotted bronze bags contain 2 dull salmon bags.
114faded red bags contain 2 posh indigo bags, 5 dotted aqua bags.
115wavy teal bags contain 3 faded tomato bags, 4 dark silver bags, 3 shiny cyan bags.
116dim tomato bags contain 4 wavy silver bags, 3 drab red bags.
117muted beige bags contain 1 bright gray bag, 1 dark red bag.
118shiny yellow bags contain 2 light plum bags.
119wavy indigo bags contain 1 faded red bag, 1 plaid yellow bag, 2 dull aqua bags.
120plaid maroon bags contain 5 vibrant beige bags.
121wavy tan bags contain 5 plaid maroon bags.
122striped coral bags contain 1 pale silver bag, 4 clear beige bags, 3 dotted aqua bags, 3 striped turquoise bags.
123shiny black bags contain 1 clear silver bag, 1 mirrored blue bag.
124muted silver bags contain 1 posh teal bag, 4 faded teal bags, 4 plaid aqua bags, 2 striped olive bags.
125pale gray bags contain 4 dotted silver bags.
126light white bags contain 2 dull salmon bags, 5 vibrant violet bags, 1 dull black bag.
127mirrored beige bags contain 3 dark teal bags, 3 wavy coral bags, 3 plaid black bags.
128mirrored tomato bags contain 5 muted bronze bags, 2 drab gold bags, 4 dark plum bags.
129dull magenta bags contain 1 wavy black bag, 5 dull gray bags.
130pale crimson bags contain 3 wavy brown bags, 5 dark green bags, 3 pale fuchsia bags.
131pale beige bags contain 3 posh black bags, 4 dotted gold bags, 1 plaid blue bag.
132dull red bags contain 2 light chartreuse bags, 1 striped tomato bag, 4 plaid green bags, 3 dull chartreuse bags.
133dotted violet bags contain 4 dark plum bags, 3 dull plum bags, 4 pale red bags.
134muted bronze bags contain 2 muted teal bags, 5 shiny purple bags, 4 pale chartreuse bags, 4 wavy salmon bags.
135dark coral bags contain 5 dull indigo bags, 1 vibrant plum bag, 2 mirrored black bags, 4 drab gold bags.
136shiny magenta bags contain 5 light turquoise bags, 4 striped olive bags.
137faded olive bags contain 2 clear white bags.
138pale aqua bags contain 2 vibrant fuchsia bags.
139vibrant yellow bags contain 4 muted teal bags, 1 mirrored teal bag.
140dotted lime bags contain 5 dotted white bags, 2 wavy aqua bags, 3 pale salmon bags.
141dark bronze bags contain 1 clear beige bag, 1 muted olive bag.
142dim lavender bags contain 1 dull indigo bag, 2 shiny purple bags, 4 dull teal bags.
143wavy gold bags contain 5 dull black bags, 1 muted fuchsia bag, 4 dark red bags, 1 light crimson bag.
144striped crimson bags contain 5 shiny gray bags, 3 mirrored crimson bags, 2 drab chartreuse bags, 4 dull aqua bags.
145dark aqua bags contain 1 bright indigo bag, 5 muted white bags, 2 shiny crimson bags, 3 mirrored orange bags.
146posh black bags contain 3 pale tan bags, 1 dim brown bag, 5 clear green bags.
147bright beige bags contain 4 dotted black bags.
148dull maroon bags contain 1 drab red bag, 4 faded turquoise bags, 1 pale olive bag.
149dull salmon bags contain 3 mirrored olive bags, 3 dull indigo bags, 1 dim brown bag, 4 shiny lime bags.
150faded purple bags contain 4 faded indigo bags.
151light beige bags contain 1 posh gray bag, 3 dotted white bags, 1 striped silver bag.
152vibrant magenta bags contain 4 drab red bags, 1 dotted white bag, 5 striped aqua bags.
153light maroon bags contain 1 dull black bag.
154light olive bags contain 3 dull tan bags.
155vibrant lime bags contain 2 dim lavender bags.
156muted aqua bags contain 3 bright olive bags, 1 muted teal bag, 3 dull crimson bags.
157dotted beige bags contain no other bags.
158dotted indigo bags contain 2 light lavender bags, 5 dark white bags, 3 wavy gray bags, 4 plaid chartreuse bags.
159drab yellow bags contain 4 mirrored aqua bags, 5 plaid olive bags, 5 dull black bags, 4 striped turquoise bags.
160light lime bags contain 3 striped turquoise bags, 4 muted coral bags, 5 muted yellow bags, 4 mirrored silver bags.
161dark crimson bags contain 2 light bronze bags, 1 vibrant chartreuse bag.
162clear plum bags contain 1 muted indigo bag, 5 dim red bags, 2 pale orange bags, 5 light black bags.
163mirrored violet bags contain 3 wavy salmon bags.
164striped silver bags contain 5 bright olive bags, 5 dim brown bags, 2 posh blue bags, 1 posh purple bag.
165posh gold bags contain 5 faded lavender bags.
166striped lime bags contain 4 striped coral bags.
167plaid tomato bags contain 2 dull white bags, 1 wavy white bag, 5 drab red bags.
168drab tan bags contain 1 mirrored bronze bag, 1 mirrored tomato bag, 2 mirrored green bags.
169posh purple bags contain 4 dull cyan bags.
170plaid blue bags contain 2 muted fuchsia bags, 1 bright teal bag, 2 pale chartreuse bags.
171dim lime bags contain 4 drab gold bags, 1 muted fuchsia bag, 1 posh tomato bag.
172dark white bags contain 2 wavy gold bags.
173bright red bags contain 4 light fuchsia bags, 1 plaid orange bag, 1 pale red bag.
174wavy blue bags contain 4 striped red bags, 1 mirrored black bag.
175light teal bags contain 1 faded orange bag, 5 muted white bags.
176shiny blue bags contain 1 drab red bag, 3 shiny brown bags, 2 dark teal bags, 2 dotted silver bags.
177bright gray bags contain 3 muted teal bags, 2 clear plum bags, 5 light olive bags, 5 dark red bags.
178bright black bags contain 5 posh yellow bags, 1 striped maroon bag.
179shiny gold bags contain 3 wavy gold bags, 2 plaid chartreuse bags, 2 shiny lime bags, 5 dull indigo bags.
180striped teal bags contain 4 dark lime bags, 4 light yellow bags, 2 dull brown bags.
181wavy coral bags contain 3 dim yellow bags, 1 clear red bag, 4 pale chartreuse bags.
182plaid chartreuse bags contain 1 striped maroon bag, 5 dotted yellow bags.
183pale turquoise bags contain 3 clear yellow bags, 2 dim coral bags.
184vibrant plum bags contain 3 dotted yellow bags.
185drab cyan bags contain 5 vibrant green bags.
186wavy crimson bags contain 1 mirrored gray bag, 2 dim teal bags.
187wavy maroon bags contain 3 pale tan bags.
188light orange bags contain 4 vibrant silver bags, 2 dim olive bags, 2 drab red bags.
189plaid brown bags contain 2 bright turquoise bags, 4 shiny tan bags, 2 dull indigo bags, 3 plaid olive bags.
190posh silver bags contain 5 wavy coral bags.
191wavy bronze bags contain 1 plaid yellow bag, 1 dim gold bag.
192shiny violet bags contain 5 plaid coral bags, 2 mirrored brown bags.
193posh lime bags contain 3 wavy bronze bags, 2 striped tomato bags, 2 pale tan bags.
194dim salmon bags contain 3 dim brown bags, 5 drab chartreuse bags.
195faded beige bags contain no other bags.
196dotted gray bags contain 5 dark lime bags, 2 posh black bags, 3 muted fuchsia bags.
197dull crimson bags contain 5 vibrant fuchsia bags.
198drab brown bags contain 5 pale maroon bags, 5 light crimson bags.
199bright blue bags contain 5 vibrant brown bags.
200bright violet bags contain 1 light white bag, 5 clear beige bags, 2 dull crimson bags.
201plaid magenta bags contain 2 light plum bags, 1 wavy white bag, 5 pale green bags, 1 bright tomato bag.
202faded silver bags contain 5 light black bags, 5 mirrored teal bags, 5 vibrant plum bags.
203wavy brown bags contain 4 faded gray bags, 3 dotted olive bags, 1 light silver bag.
204clear teal bags contain 2 mirrored black bags, 2 wavy gold bags, 2 striped red bags, 5 light silver bags.
205posh crimson bags contain 5 drab tan bags.
206clear fuchsia bags contain 4 faded tomato bags, 1 dotted beige bag.
207bright maroon bags contain 2 wavy teal bags, 2 shiny gray bags, 5 dull gray bags, 3 dull teal bags.
208drab gray bags contain 3 dark white bags, 2 pale salmon bags, 4 bright teal bags.
209vibrant brown bags contain 4 wavy salmon bags.
210bright green bags contain 2 clear cyan bags, 3 wavy lavender bags, 2 plaid blue bags, 2 faded gold bags.
211light salmon bags contain 1 muted tan bag, 5 plaid plum bags.
212plaid bronze bags contain 4 mirrored chartreuse bags, 3 plaid turquoise bags, 2 wavy orange bags, 5 dotted yellow bags.
213dull bronze bags contain 2 vibrant lime bags, 2 muted purple bags, 2 dark magenta bags.
214bright orange bags contain 4 pale violet bags, 2 light fuchsia bags, 3 dull purple bags.
215wavy fuchsia bags contain 4 dotted olive bags, 1 dull brown bag.
216mirrored olive bags contain 4 muted fuchsia bags, 4 striped turquoise bags.
217shiny salmon bags contain 2 dark white bags.
218striped tan bags contain 4 mirrored purple bags.
219dull coral bags contain 3 posh coral bags, 1 dotted green bag.
220drab teal bags contain 4 wavy yellow bags, 5 mirrored aqua bags.
221shiny tan bags contain 5 striped maroon bags, 5 vibrant red bags.
222bright crimson bags contain 1 muted magenta bag.
223shiny lime bags contain 1 faded teal bag, 1 light crimson bag.
224posh white bags contain 3 posh orange bags, 4 pale gray bags, 5 dull maroon bags, 5 plaid plum bags.
225dotted brown bags contain 1 vibrant indigo bag, 1 plaid olive bag.
226faded coral bags contain 5 muted bronze bags, 3 mirrored lavender bags.
227faded brown bags contain 1 bright turquoise bag, 3 posh indigo bags, 2 pale fuchsia bags, 3 dark indigo bags.
228vibrant aqua bags contain 2 clear beige bags, 3 posh olive bags, 3 dark turquoise bags, 2 posh magenta bags.
229dark turquoise bags contain 1 striped gold bag, 1 mirrored red bag.
230drab gold bags contain 2 clear beige bags, 4 striped turquoise bags, 1 pale orange bag, 1 clear salmon bag.
231mirrored green bags contain 4 dotted beige bags, 3 pale chartreuse bags, 3 light crimson bags.
232clear violet bags contain 3 posh orange bags, 4 faded beige bags, 3 drab red bags, 4 shiny salmon bags.
233posh plum bags contain 1 shiny white bag, 1 striped lavender bag.
234vibrant purple bags contain 5 bright teal bags.
235dark salmon bags contain 4 striped olive bags, 5 mirrored crimson bags, 5 plaid lime bags, 3 dark tomato bags.
236shiny silver bags contain 2 vibrant red bags.
237dull turquoise bags contain 3 faded crimson bags, 1 drab maroon bag, 5 drab gold bags.
238dull orange bags contain 1 dark yellow bag, 3 bright beige bags.
239bright bronze bags contain 3 posh salmon bags, 1 mirrored violet bag, 2 muted white bags, 3 dotted orange bags.
240bright teal bags contain 4 dim fuchsia bags.
241clear turquoise bags contain 1 faded teal bag, 2 dull teal bags.
242wavy magenta bags contain 4 dim teal bags, 3 mirrored bronze bags, 3 plaid plum bags, 5 wavy lavender bags.
243faded bronze bags contain 2 striped salmon bags, 3 dark red bags, 1 dark indigo bag.
244faded plum bags contain 1 clear green bag.
245faded maroon bags contain 1 striped maroon bag, 5 dim black bags, 1 vibrant indigo bag.
246muted teal bags contain 4 light crimson bags, 5 drab chartreuse bags.
247vibrant maroon bags contain 3 dark fuchsia bags, 3 plaid turquoise bags, 1 pale silver bag, 4 shiny cyan bags.
248plaid crimson bags contain 3 mirrored olive bags.
249clear tan bags contain 1 vibrant purple bag, 1 wavy aqua bag.
250clear aqua bags contain 4 bright white bags.
251striped red bags contain 3 wavy coral bags, 3 dark white bags, 4 muted fuchsia bags, 4 posh tomato bags.
252posh violet bags contain 1 muted fuchsia bag, 3 dim coral bags, 2 drab orange bags.
253plaid cyan bags contain 2 shiny indigo bags.
254light chartreuse bags contain 5 wavy tan bags, 4 clear indigo bags.
255vibrant lavender bags contain 3 light gray bags, 4 striped beige bags, 5 dark maroon bags, 3 drab fuchsia bags.
256dim red bags contain 4 pale orange bags, 3 drab chartreuse bags.
257vibrant turquoise bags contain 3 clear tomato bags, 4 posh blue bags.
258muted green bags contain 4 clear bronze bags, 3 dotted black bags, 3 dull beige bags.
259faded salmon bags contain 2 drab gold bags, 2 clear red bags, 2 dark indigo bags, 5 plaid teal bags.
260posh chartreuse bags contain 4 dotted orange bags.
261dotted turquoise bags contain 5 shiny fuchsia bags, 2 vibrant indigo bags, 3 vibrant fuchsia bags, 5 muted green bags.
262wavy turquoise bags contain 1 dark white bag, 4 posh tan bags.
263clear purple bags contain 2 vibrant gray bags, 3 dark plum bags, 1 shiny fuchsia bag, 4 plaid indigo bags.
264pale tomato bags contain 2 striped silver bags, 1 mirrored aqua bag.
265pale salmon bags contain 4 muted indigo bags, 4 faded teal bags.
266dark maroon bags contain 5 dotted orange bags, 5 faded beige bags, 3 wavy salmon bags, 5 dim lavender bags.
267faded green bags contain 3 wavy coral bags, 5 dull indigo bags, 4 dim salmon bags, 1 pale gray bag.
268bright gold bags contain 4 drab lavender bags.
269dull white bags contain 4 clear salmon bags, 2 shiny gold bags.
270drab olive bags contain 3 pale lime bags, 3 striped crimson bags, 5 plaid gray bags, 2 posh magenta bags.
271bright cyan bags contain 4 dotted black bags.
272drab beige bags contain 4 shiny yellow bags.
273dotted salmon bags contain 5 light maroon bags, 5 dotted gray bags.
274posh gray bags contain 3 dark red bags, 2 mirrored gray bags, 2 dim brown bags, 4 dotted aqua bags.
275dull gray bags contain 2 shiny beige bags, 5 posh silver bags.
276light blue bags contain 1 dim coral bag, 5 vibrant plum bags, 1 clear salmon bag, 1 clear yellow bag.
277striped gray bags contain 5 striped indigo bags, 1 faded lime bag, 2 light tomato bags.
278dark violet bags contain 1 posh gray bag, 5 shiny cyan bags, 2 pale indigo bags, 4 light coral bags.
279striped black bags contain 5 dotted maroon bags, 1 drab blue bag.
280shiny coral bags contain 1 clear yellow bag, 5 striped plum bags, 4 dull tomato bags.
281faded tan bags contain 5 vibrant bronze bags, 5 muted fuchsia bags, 1 pale coral bag, 4 dull indigo bags.
282pale white bags contain 4 clear cyan bags, 2 bright yellow bags, 4 vibrant tomato bags.
283plaid plum bags contain 5 pale violet bags, 3 posh yellow bags, 3 faded silver bags.
284bright fuchsia bags contain 5 clear black bags.
285dotted red bags contain 3 dark magenta bags, 5 clear indigo bags, 1 faded bronze bag, 4 dotted gray bags.
286plaid turquoise bags contain 2 dark indigo bags.
287pale lavender bags contain 4 posh fuchsia bags, 1 clear black bag, 4 wavy lime bags.
288bright lavender bags contain 2 wavy magenta bags, 5 plaid blue bags, 1 drab yellow bag, 1 muted gray bag.
289bright white bags contain 4 light gray bags.
290dull black bags contain 2 shiny lime bags, 3 muted indigo bags, 5 faded beige bags.
291muted tomato bags contain 2 dark yellow bags.
292plaid fuchsia bags contain 2 dull lavender bags.
293dark indigo bags contain 2 dim lavender bags, 3 shiny maroon bags.
294mirrored magenta bags contain 1 mirrored chartreuse bag.
295vibrant violet bags contain 5 dotted beige bags, 5 plaid olive bags.
296pale lime bags contain 1 vibrant silver bag, 4 shiny white bags, 2 wavy orange bags, 3 plaid coral bags.
297mirrored aqua bags contain 5 light yellow bags, 3 plaid silver bags, 2 dark white bags, 2 dull teal bags.
298striped turquoise bags contain 1 bright turquoise bag, 2 faded beige bags.
299faded indigo bags contain 2 dotted purple bags.
300plaid green bags contain 3 dim orange bags.
301dotted lavender bags contain 5 dotted crimson bags, 5 bright turquoise bags, 3 muted lavender bags, 4 mirrored olive bags.
302muted tan bags contain 2 faded orange bags, 5 mirrored gray bags, 1 faded green bag.
303dark plum bags contain 2 mirrored olive bags, 4 muted fuchsia bags, 2 shiny maroon bags, 1 dim fuchsia bag.
304light cyan bags contain 4 dotted gray bags, 4 wavy red bags, 1 dull white bag.
305striped gold bags contain 2 wavy silver bags, 2 muted purple bags, 3 wavy coral bags.
306striped white bags contain 4 wavy coral bags, 4 pale plum bags, 2 wavy black bags, 5 dim olive bags.
307mirrored yellow bags contain 3 plaid chartreuse bags, 4 muted gold bags, 1 mirrored bronze bag.
308clear tomato bags contain 3 striped indigo bags, 3 dim fuchsia bags, 2 wavy gray bags.
309faded teal bags contain no other bags.
310faded lavender bags contain 2 clear bronze bags, 3 muted teal bags, 2 dotted yellow bags, 5 shiny purple bags.
311posh lavender bags contain 5 posh gray bags.
312bright brown bags contain 2 dull crimson bags, 5 muted bronze bags, 4 dark indigo bags, 5 mirrored orange bags.
313faded crimson bags contain 3 dotted crimson bags.
314mirrored teal bags contain 1 plaid blue bag, 1 clear red bag, 5 striped turquoise bags, 4 dotted beige bags.
315dark fuchsia bags contain 1 faded green bag.
316dim coral bags contain 5 clear salmon bags, 4 dotted beige bags, 1 pale salmon bag, 2 plaid chartreuse bags.
317posh blue bags contain 3 pale maroon bags, 5 dim coral bags.
318light indigo bags contain 1 vibrant silver bag, 1 bright chartreuse bag, 1 light black bag.
319shiny lavender bags contain 4 dotted olive bags, 5 faded brown bags, 1 plaid tomato bag.
320dotted white bags contain 4 dim olive bags.
321dotted chartreuse bags contain 4 striped turquoise bags, 1 dotted silver bag.
322faded black bags contain 2 muted white bags, 3 drab teal bags, 3 wavy gray bags.
323vibrant white bags contain 4 dark white bags, 4 clear violet bags, 3 plaid magenta bags, 5 dark green bags.
324faded magenta bags contain 3 faded green bags, 4 plaid olive bags, 5 plaid brown bags, 1 wavy salmon bag.
325dull plum bags contain 3 muted purple bags.
326dim indigo bags contain 5 dotted fuchsia bags, 5 drab red bags, 1 dull green bag, 5 dim fuchsia bags.
327pale yellow bags contain 4 mirrored bronze bags.
328light violet bags contain 5 dull black bags.
329posh green bags contain 1 plaid plum bag, 3 pale violet bags, 5 muted salmon bags.
330mirrored purple bags contain 3 mirrored aqua bags, 1 plaid blue bag.
331clear orange bags contain 3 light beige bags.
332striped tomato bags contain 4 dark orange bags, 1 bright aqua bag.
333dark gray bags contain 1 posh violet bag.
334plaid beige bags contain 5 pale beige bags.
335plaid gray bags contain 3 mirrored bronze bags, 3 clear green bags, 5 dark chartreuse bags.
336mirrored coral bags contain 1 pale tan bag, 2 plaid coral bags, 5 striped bronze bags.
337dull silver bags contain 1 vibrant purple bag, 3 drab lavender bags, 2 mirrored salmon bags.
338clear yellow bags contain 1 shiny gold bag, 4 dotted beige bags, 4 dark lime bags.
339light gold bags contain 3 shiny white bags, 4 dim violet bags, 1 light olive bag.
340drab white bags contain 5 shiny lavender bags, 4 dotted lavender bags.
341faded yellow bags contain 2 dull crimson bags, 3 muted indigo bags, 2 plaid crimson bags, 3 clear green bags.
342light gray bags contain 2 plaid orange bags, 5 plaid lavender bags.
343dim bronze bags contain 1 vibrant coral bag, 1 wavy teal bag, 1 pale crimson bag.
344shiny gray bags contain 5 light lavender bags, 3 drab red bags, 1 plaid chartreuse bag.
345striped beige bags contain 3 light black bags, 1 dull teal bag.
346dotted fuchsia bags contain 3 faded indigo bags, 2 dim gray bags.
347plaid yellow bags contain 4 pale maroon bags, 5 dull black bags, 1 plaid chartreuse bag, 3 drab orange bags.
348muted orange bags contain 3 muted lavender bags.
349muted crimson bags contain 4 muted cyan bags, 1 dull plum bag.
350muted red bags contain 5 faded turquoise bags, 5 light silver bags, 5 dotted aqua bags.
351vibrant chartreuse bags contain 4 wavy violet bags, 1 plaid beige bag, 2 clear cyan bags, 2 dull lavender bags.
352pale fuchsia bags contain 3 plaid blue bags, 3 muted bronze bags, 4 faded blue bags.
353dotted tomato bags contain 4 dark tomato bags, 3 plaid orange bags, 5 posh teal bags.
354dim green bags contain 1 dull white bag.
355dim aqua bags contain 2 light silver bags, 3 faded silver bags, 3 dotted orange bags, 4 vibrant salmon bags.
356dim brown bags contain no other bags.
357muted chartreuse bags contain 2 dark coral bags, 5 striped plum bags.
358drab indigo bags contain 2 posh brown bags.
359dark orange bags contain 4 plaid blue bags, 1 dark brown bag, 2 striped indigo bags, 1 dark magenta bag.
360bright yellow bags contain 3 clear tomato bags.
361clear bronze bags contain 4 wavy salmon bags.
362dotted olive bags contain 4 striped beige bags, 3 drab orange bags, 3 bright teal bags.
363dull violet bags contain 4 plaid salmon bags, 5 faded olive bags.
364clear white bags contain 2 plaid coral bags, 1 muted indigo bag, 1 striped beige bag.
365dull tan bags contain 5 dim red bags, 5 posh gold bags, 2 clear red bags.
366mirrored plum bags contain 4 dim beige bags.
367wavy purple bags contain 2 posh silver bags, 5 shiny tan bags, 3 pale red bags, 3 dull salmon bags.
368dim black bags contain 3 light yellow bags.
369dotted coral bags contain 3 pale violet bags.
370posh bronze bags contain 1 posh tomato bag, 1 drab purple bag, 3 dim fuchsia bags, 2 bright brown bags.
371wavy salmon bags contain no other bags.
372dull blue bags contain 5 dark plum bags, 4 light yellow bags.
373faded lime bags contain 2 dim red bags, 3 drab lavender bags, 5 muted black bags, 2 light coral bags.
374vibrant coral bags contain 4 muted purple bags, 5 pale chartreuse bags, 5 dotted black bags.
375mirrored chartreuse bags contain 5 muted olive bags.
376dark lime bags contain 1 dark magenta bag.
377light coral bags contain 2 dull lavender bags.
378bright lime bags contain 2 wavy bronze bags.
379mirrored orange bags contain 1 pale salmon bag, 1 light orange bag.
380muted brown bags contain 3 clear beige bags, 1 faded salmon bag, 2 vibrant cyan bags, 4 clear white bags.
381posh orange bags contain 2 dark lime bags, 3 wavy purple bags.
382posh magenta bags contain 2 dark teal bags.
383drab salmon bags contain 5 drab tomato bags.
384muted fuchsia bags contain no other bags.
385wavy tomato bags contain 4 wavy black bags, 4 faded teal bags.
386dim chartreuse bags contain 5 drab green bags, 4 drab magenta bags.
387dotted crimson bags contain 2 dark white bags, 5 wavy black bags, 4 dull crimson bags.
388posh maroon bags contain 4 plaid silver bags, 4 vibrant lime bags, 4 posh gray bags, 3 dull maroon bags.
389dull green bags contain 5 muted tan bags, 5 drab red bags.
390clear maroon bags contain 3 faded brown bags.
391striped yellow bags contain 4 faded lavender bags, 1 wavy coral bag, 5 clear maroon bags.
392dull tomato bags contain 2 shiny white bags, 2 light silver bags, 4 dotted chartreuse bags, 4 dark brown bags.
393drab chartreuse bags contain 3 dotted beige bags, 3 pale chartreuse bags, 2 muted fuchsia bags, 5 light crimson bags.
394plaid purple bags contain 3 drab yellow bags.
395light plum bags contain 1 dotted aqua bag, 2 dark white bags.
396mirrored brown bags contain 3 mirrored teal bags, 2 dull cyan bags.
397mirrored crimson bags contain 3 dull chartreuse bags, 2 dark silver bags, 5 bright cyan bags, 4 dark tomato bags.
398dull gold bags contain 4 muted salmon bags.
399wavy olive bags contain 3 mirrored brown bags, 5 clear indigo bags.
400faded turquoise bags contain 2 clear salmon bags, 2 mirrored gray bags, 1 dark lime bag.
401bright indigo bags contain 2 faded lavender bags, 1 shiny gray bag, 4 mirrored indigo bags.
402pale teal bags contain 3 dark violet bags, 5 shiny salmon bags.
403plaid orange bags contain 5 faded green bags, 5 pale magenta bags.
404shiny crimson bags contain 5 shiny green bags, 1 bright tomato bag, 3 vibrant lime bags, 3 clear purple bags.
405muted indigo bags contain 4 dim brown bags, 1 dotted beige bag.
406dark cyan bags contain 2 striped yellow bags.
407dull teal bags contain 1 muted indigo bag, 2 drab chartreuse bags, 5 faded beige bags.
408striped fuchsia bags contain 1 mirrored teal bag, 3 dull black bags, 2 dim salmon bags, 5 wavy salmon bags.
409drab crimson bags contain 5 dim teal bags, 2 wavy red bags, 3 dark brown bags.
410dull olive bags contain 1 clear yellow bag, 4 plaid indigo bags, 4 posh tomato bags, 1 dotted orange bag.
411muted lime bags contain 2 light white bags, 5 dotted violet bags, 5 posh gold bags, 2 bright cyan bags.
412dark purple bags contain 1 light lavender bag, 2 plaid olive bags, 5 striped maroon bags, 1 dotted gold bag.
413dull yellow bags contain 5 mirrored beige bags.
414dotted maroon bags contain 3 clear salmon bags, 1 light salmon bag.
415dull beige bags contain 5 shiny fuchsia bags.
416clear green bags contain 4 muted lavender bags, 5 faded orange bags, 4 faded silver bags, 4 clear red bags.
417striped magenta bags contain 2 dotted plum bags.
418posh beige bags contain 5 vibrant maroon bags, 1 dim lavender bag.
419striped blue bags contain 3 clear turquoise bags, 3 dark purple bags, 3 shiny yellow bags, 5 clear teal bags.
420muted magenta bags contain 3 striped orange bags, 5 dim brown bags.
421vibrant orange bags contain 1 bright teal bag, 1 drab salmon bag, 5 dull silver bags.
422pale violet bags contain 4 shiny tan bags, 2 clear turquoise bags, 2 pale salmon bags, 2 dotted aqua bags.
423dotted aqua bags contain 2 striped turquoise bags, 1 dim fuchsia bag, 2 pale chartreuse bags, 2 bright turquoise bags.
424clear black bags contain 4 dotted beige bags, 1 dull brown bag, 2 dull teal bags.
425light tan bags contain 3 dotted red bags, 1 dark red bag.
426pale green bags contain 4 dull salmon bags, 4 dim brown bags.
427dim tan bags contain 2 posh silver bags, 2 dark fuchsia bags.
428plaid coral bags contain 2 vibrant plum bags, 5 vibrant red bags, 3 dim salmon bags.
429wavy lavender bags contain 2 dark gold bags, 5 plaid blue bags, 1 dim yellow bag.
430dim violet bags contain 2 clear tan bags, 5 pale magenta bags.
431dotted black bags contain 4 dark magenta bags.
432mirrored salmon bags contain 3 vibrant beige bags, 3 vibrant purple bags.
433dark green bags contain 4 dotted yellow bags, 1 faded green bag, 3 muted lavender bags.
434faded blue bags contain 4 clear turquoise bags, 1 posh indigo bag, 2 faded green bags.
435pale black bags contain 2 pale coral bags, 3 faded black bags, 3 mirrored teal bags, 4 muted chartreuse bags.
436plaid black bags contain 3 posh brown bags, 3 dark maroon bags, 1 mirrored black bag.
437dim olive bags contain 5 posh indigo bags.
438dark lavender bags contain 3 light gold bags, 5 dim purple bags.
439shiny turquoise bags contain 3 dim fuchsia bags, 4 faded silver bags, 4 dim salmon bags.
440light green bags contain 1 drab red bag.
441wavy plum bags contain 2 wavy gold bags, 5 bright tan bags.
442vibrant tan bags contain 3 drab gray bags.
443shiny orange bags contain 2 clear plum bags, 1 posh red bag.
444dull lime bags contain 3 pale silver bags.
445shiny cyan bags contain 3 shiny purple bags.
446posh brown bags contain 1 striped salmon bag, 2 dotted beige bags.
447mirrored blue bags contain 2 muted olive bags, 5 mirrored aqua bags.
448dark red bags contain 2 shiny purple bags, 4 dim salmon bags, 2 wavy salmon bags.
449wavy gray bags contain 4 striped fuchsia bags, 2 wavy salmon bags, 4 faded silver bags.
450clear gold bags contain 2 vibrant plum bags.
451dark silver bags contain 4 striped gold bags, 4 plaid teal bags, 1 pale yellow bag.
452dim cyan bags contain 4 mirrored blue bags, 1 vibrant red bag, 5 shiny indigo bags, 5 muted gray bags.
453bright chartreuse bags contain 4 light yellow bags, 3 faded lavender bags.
454dotted green bags contain 3 pale indigo bags, 3 drab gray bags, 2 dark white bags, 4 light yellow bags.
455vibrant bronze bags contain 5 light white bags, 1 dim lime bag, 5 dim brown bags, 5 plaid coral bags.
456muted purple bags contain 3 dark maroon bags.
457bright salmon bags contain 3 clear beige bags.
458mirrored lime bags contain 1 wavy coral bag, 1 mirrored gray bag.
459faded cyan bags contain 2 pale bronze bags, 3 vibrant plum bags.
460dull aqua bags contain 2 dark coral bags, 3 clear turquoise bags.
461posh aqua bags contain 1 pale teal bag, 2 dim coral bags.
462wavy aqua bags contain 2 posh indigo bags, 4 shiny cyan bags, 3 muted tan bags.
463dark magenta bags contain 1 pale red bag, 1 dull brown bag, 3 faded lavender bags.
464striped lavender bags contain 4 striped gold bags, 3 mirrored olive bags, 2 dim lime bags, 1 muted indigo bag.
465bright turquoise bags contain no other bags.
466dim teal bags contain 5 dark white bags, 2 faded chartreuse bags, 1 striped beige bag, 4 muted gold bags.
467wavy yellow bags contain 4 pale fuchsia bags.
468muted black bags contain 1 striped salmon bag, 1 shiny gold bag, 3 plaid gray bags.
469dark beige bags contain 3 wavy gray bags, 5 dim red bags.
470mirrored tan bags contain 2 faded purple bags, 4 faded lime bags, 5 dull lavender bags, 4 dark plum bags.
471vibrant teal bags contain 1 dark teal bag, 4 dotted chartreuse bags.
472bright plum bags contain 1 vibrant silver bag.
473dotted purple bags contain 3 faded beige bags, 3 muted lavender bags.
474faded tomato bags contain 1 muted olive bag, 5 faded orange bags, 5 light yellow bags.
475light crimson bags contain no other bags.
476drab fuchsia bags contain 2 vibrant silver bags, 1 dim fuchsia bag, 3 clear plum bags, 1 drab gold bag.
477muted blue bags contain 1 dotted silver bag, 5 dull beige bags, 3 posh silver bags.
478dark brown bags contain 1 clear red bag, 2 light yellow bags, 1 wavy gold bag, 2 plaid olive bags.
479dim gold bags contain 4 dotted purple bags, 3 plaid blue bags.
480dim crimson bags contain 5 muted magenta bags.
481shiny teal bags contain 1 dotted bronze bag, 4 vibrant teal bags, 4 pale blue bags.
482drab blue bags contain 3 dark salmon bags.
483bright olive bags contain 5 pale fuchsia bags.
484mirrored gold bags contain 2 posh brown bags, 2 bright purple bags, 5 shiny cyan bags.
485dim turquoise bags contain 4 pale cyan bags, 2 mirrored violet bags.
486clear silver bags contain 4 dark plum bags, 4 pale gray bags, 5 mirrored bronze bags.
487clear olive bags contain 4 muted green bags.
488drab lime bags contain 3 dotted aqua bags, 2 faded blue bags, 3 faded salmon bags, 3 dim yellow bags.
489dim fuchsia bags contain no other bags.
490mirrored black bags contain 1 dark white bag.
491clear cyan bags contain 3 plaid chartreuse bags, 3 plaid teal bags, 5 dark gold bags, 5 dim lime bags.
492bright tomato bags contain 4 dark green bags.
493dim white bags contain 2 shiny yellow bags, 1 pale maroon bag.
494light turquoise bags contain 5 posh blue bags, 2 light fuchsia bags.
495shiny olive bags contain 5 vibrant white bags, 3 dark salmon bags, 5 dotted tan bags.
496striped maroon bags contain 1 mirrored olive bag.
497striped salmon bags contain 3 muted indigo bags, 5 wavy salmon bags, 4 shiny maroon bags, 4 dim fuchsia bags.
498striped orange bags contain 2 dotted purple bags, 4 shiny cyan bags, 1 drab gold bag, 4 dark beige bags.
499posh olive bags contain 3 faded tomato bags, 5 posh blue bags, 1 clear red bag.
500shiny plum bags contain 3 pale purple bags, 3 dim beige bags.
501dark olive bags contain 4 dull coral bags.
502dotted teal bags contain 5 plaid lavender bags, 4 clear bronze bags, 4 dim lime bags, 3 pale maroon bags.
503clear brown bags contain 2 wavy teal bags, 1 faded green bag, 5 light white bags.
504clear crimson bags contain 4 pale turquoise bags, 5 plaid green bags, 3 shiny aqua bags, 5 wavy turquoise bags.
505mirrored maroon bags contain 5 bright coral bags, 5 drab orange bags.
506wavy violet bags contain 4 mirrored tomato bags, 4 striped gold bags.
507plaid olive bags contain 3 dotted silver bags.
508light purple bags contain 2 dark red bags, 5 dull cyan bags, 4 plaid black bags.
509wavy orange bags contain 1 dim green bag, 4 dark coral bags.
510vibrant red bags contain 4 posh brown bags.
511wavy silver bags contain 5 faded orange bags, 2 wavy coral bags, 4 faded silver bags.
512dark tan bags contain 3 mirrored brown bags, 2 bright plum bags, 2 plaid silver bags.
513vibrant blue bags contain 1 wavy salmon bag, 5 pale green bags.
514shiny bronze bags contain 5 wavy white bags, 1 dim indigo bag, 5 muted crimson bags, 5 shiny lime bags.
515clear red bags contain 1 dotted aqua bag, 3 pale chartreuse bags, 2 muted teal bags, 5 posh brown bags.
516dotted silver bags contain 2 dark maroon bags, 3 dim brown bags.
517bright tan bags contain 1 posh black bag, 5 striped orange bags, 5 drab gold bags.
518drab red bags contain 5 posh gray bags.
519striped purple bags contain 1 striped silver bag, 1 pale blue bag, 4 mirrored black bags.
520striped bronze bags contain 2 striped gold bags, 5 light crimson bags, 5 faded tomato bags, 3 wavy indigo bags.
521pale red bags contain 2 mirrored olive bags, 5 faded orange bags, 4 faded chartreuse bags, 2 plaid chartreuse bags.
522dim plum bags contain 4 vibrant coral bags, 3 clear purple bags, 3 dull blue bags.
523muted yellow bags contain 2 clear red bags, 3 pale plum bags.
524posh salmon bags contain 3 pale tan bags, 3 wavy gold bags.
525mirrored bronze bags contain 4 faded bronze bags, 1 clear black bag, 5 dark white bags.
526muted cyan bags contain 2 dim plum bags.
527vibrant fuchsia bags contain 1 faded teal bag, 2 muted teal bags, 3 pale chartreuse bags, 3 bright teal bags.
528mirrored fuchsia bags contain 4 dull red bags, 1 light cyan bag, 3 wavy crimson bags, 3 wavy yellow bags.
529clear indigo bags contain 5 clear bronze bags, 4 dark coral bags, 4 drab chartreuse bags.
530pale bronze bags contain 2 faded salmon bags, 1 shiny black bag, 3 pale yellow bags, 3 dotted chartreuse bags.
531pale purple bags contain 4 mirrored black bags, 1 vibrant silver bag, 2 striped beige bags, 5 dotted chartreuse bags.
532muted gray bags contain 4 shiny purple bags, 4 light green bags, 1 pale fuchsia bag.
533clear blue bags contain 5 dotted olive bags, 4 light purple bags.
534posh cyan bags contain 5 muted tan bags, 1 dotted cyan bag, 4 wavy gold bags.
535bright purple bags contain 4 wavy salmon bags, 1 dark teal bag, 4 pale yellow bags.
536drab aqua bags contain 1 vibrant red bag.
537pale silver bags contain 4 light lavender bags, 2 mirrored bronze bags, 1 striped teal bag.
538dark blue bags contain 3 dull beige bags, 4 faded salmon bags, 1 dull black bag, 5 posh salmon bags.
539plaid tan bags contain 1 plaid lavender bag, 5 pale lavender bags, 4 light aqua bags.
540posh tan bags contain 3 dotted lime bags.
541drab maroon bags contain 5 mirrored chartreuse bags.
542dim magenta bags contain 1 pale fuchsia bag, 2 light fuchsia bags, 5 bright bronze bags, 1 faded gray bag.
543shiny purple bags contain 2 pale chartreuse bags.
544drab turquoise bags contain 4 light turquoise bags.
545light bronze bags contain 2 posh black bags, 3 dark yellow bags, 3 faded plum bags.
546plaid gold bags contain 4 dark teal bags, 4 shiny plum bags.
547dim maroon bags contain 2 clear plum bags, 3 striped aqua bags, 2 striped teal bags.
548drab coral bags contain 3 faded chartreuse bags, 2 drab plum bags, 3 faded red bags, 1 dark blue bag.
549faded gray bags contain 3 pale gray bags, 2 dull beige bags, 5 wavy indigo bags.
550dotted magenta bags contain 2 light salmon bags.
551light magenta bags contain 3 posh yellow bags, 3 dotted green bags, 1 drab violet bag.
552dotted cyan bags contain 2 faded plum bags.
553dim orange bags contain 5 light brown bags, 5 bright yellow bags.
554posh teal bags contain 1 faded beige bag, 5 mirrored gold bags, 5 bright teal bags.
555dim purple bags contain 2 light silver bags, 5 muted red bags, 1 mirrored gold bag, 2 posh orange bags.
556shiny tomato bags contain 3 striped coral bags, 3 dark plum bags, 5 plaid turquoise bags.
557vibrant olive bags contain 3 vibrant lime bags, 5 mirrored white bags, 1 pale bronze bag, 2 striped cyan bags.
558dull lavender bags contain 5 muted gold bags, 5 pale maroon bags.
559light black bags contain 1 dark plum bag, 1 shiny gold bag.
560bright magenta bags contain 3 striped turquoise bags, 3 dim gray bags.
561drab tomato bags contain 3 vibrant purple bags, 4 shiny purple bags, 2 light maroon bags.
562posh turquoise bags contain 2 bright aqua bags, 2 striped salmon bags, 5 muted green bags.
563dotted yellow bags contain 3 dark red bags, 3 wavy gold bags.
564plaid lavender bags contain 4 striped turquoise bags, 1 dotted olive bag, 1 clear green bag, 4 shiny beige bags.
565drab black bags contain 5 dotted magenta bags, 2 drab yellow bags, 2 striped turquoise bags, 1 dark bronze bag.
566clear beige bags contain 4 striped salmon bags.
567light lavender bags contain 1 wavy silver bag, 1 dark indigo bag.
568posh red bags contain 4 muted olive bags, 3 light tan bags, 4 clear gray bags, 2 dim lime bags.
569clear coral bags contain 3 light lime bags, 2 posh violet bags.
570plaid salmon bags contain 2 pale yellow bags, 5 dark plum bags.
571pale gold bags contain 2 striped teal bags, 3 faded crimson bags.
572wavy red bags contain 4 faded green bags, 5 dim coral bags, 4 wavy silver bags, 4 plaid brown bags.
573faded white bags contain 2 posh tomato bags, 1 posh green bag, 4 vibrant lavender bags.
574dull indigo bags contain 3 muted olive bags, 4 shiny purple bags, 3 drab chartreuse bags, 1 dotted orange bag.
575wavy green bags contain 3 pale indigo bags, 1 striped purple bag, 5 dotted coral bags, 1 shiny tan bag.
576shiny red bags contain 4 pale fuchsia bags, 2 posh salmon bags.
577vibrant cyan bags contain 1 faded salmon bag, 1 faded black bag, 4 striped coral bags.
578dark tomato bags contain 3 clear maroon bags, 4 plaid maroon bags, 5 dotted aqua bags.
579vibrant gold bags contain 1 shiny fuchsia bag.
580dark black bags contain 2 wavy lime bags, 1 pale cyan bag, 4 posh brown bags.
581posh fuchsia bags contain 4 pale purple bags, 2 dull lavender bags.
582light silver bags contain 2 vibrant plum bags, 2 pale magenta bags, 4 pale chartreuse bags, 3 plaid chartreuse bags.
583dark yellow bags contain 1 dotted crimson bag, 3 faded orange bags, 5 posh teal bags, 1 clear plum bag.
584mirrored turquoise bags contain 2 muted teal bags.
585drab purple bags contain 5 dotted plum bags, 1 plaid plum bag.
586dotted tan bags contain 1 pale plum bag, 1 dotted aqua bag.
587drab bronze bags contain 4 vibrant red bags, 4 light blue bags.
588mirrored cyan bags contain 1 dark white bag, 4 dark lime bags, 5 vibrant silver bags.
589shiny aqua bags contain 5 wavy plum bags, 4 drab maroon bags, 2 drab chartreuse bags.
590striped aqua bags contain 1 plaid blue bag, 1 dark plum bag, 4 faded lavender bags.
591dotted plum bags contain 5 mirrored green bags, 1 dark plum bag, 4 dark maroon bags.
592faded gold bags contain 4 pale yellow bags.
593vibrant beige bags contain 2 light lavender bags, 3 faded indigo bags.
594light brown bags contain 3 drab brown bags, 4 dark violet bags, 3 faded indigo bags.
diff --git a/2020/day7/inside_shiny.py b/2020/day7/inside_shiny.py
new file mode 100644
index 0000000..00df40b
--- /dev/null
+++ b/2020/day7/inside_shiny.py
@@ -0,0 +1,45 @@
1import networkx as nx
2import re
3
4
5def fits_in(root):
6 """recursively count the number of bags that fit in other bags
7
8 :root: the node to count bags from
9 :returns: total
10
11 """
12 total = 1
13 for neighbour in bagtree[root]:
14 total += int(bagtree[root][neighbour]["weight"]) * fits_in(neighbour)
15 return total
16
17
18bagtree = nx.DiGraph()
19bagremover = re.compile(r" bags?\.?$")
20countandbag = re.compile(r"(\d+) (\w+ \w+)")
21
22with open("input", "r") as baglines:
23 for line in baglines:
24 (miniroot, child_str) = list(map(str.strip, line.split("contain")))
25
26 miniroot = miniroot.replace(" bags", "")
27
28 children = list(
29 map(
30 lambda a: re.sub(bagremover, "", a),
31 list(map(str.strip, child_str.split(","))),
32 )
33 )
34
35 if "no other" in children:
36 continue
37
38 for kid in children:
39 matches = re.match(countandbag, kid)
40 bagtree.add_edge(miniroot, matches.groups()[1], weight=matches.groups()[0])
41
42lengths = dict(nx.all_pairs_shortest_path(bagtree))
43
44# we don't count the shiny gold itself
45print(fits_in("shiny gold") - 1)