Decided to use Rust for this and boy did it take hours... It is a very simplistic program without any fancy whistles. But it runs and succeeded in the puzzle!