After I finished it myself, I ran it through ChatGPT (and Davinci, but that largely failed.) It generated part 1 perfectly, but it was unable to make the jump into the three compartment intersections without significant prompting, and the first couple times it completely lost the uppercase/lowercase distinctions. It was able to generate largely perfect tests from the examples though, and I had it debug itself until it worked. It wasn't amazing code, but it passed its tests and actually thought of some edge cases I hadn't considered when I coded my solution, such as odd length strings.