Comment Comment by criddell Not OP, but I too first thought of a state machine. As soon as I started to write it I realized I was over-solving a day-1 problem. So I switched to brute forcehttps://pastebin.com/r1jNCSdmOnce I get a line back from that, it's the same problem as part A. parent criddell 2 years ago
https://pastebin.com/r1jNCSdm
Once I get a line back from that, it's the same problem as part A.