Day 22This is definitely not the most efficient way to do part 2, but it ran in under 20 seconds which I can live with.