AdventOfCode just became a whole lot easier... I think you need to build in some safe guards :) Not posting the whole code, but it took me three iterations to get a working version from ChatGPT, starting with the unmodified text of the puzzle.