Uiua
Suspiciously easy. I even included a free animation generator for your entertainment.
"..@@.@@@@.\n@@@.@.@.@@\n@@@@@.@.@@\n@.@@@@..@.\n@@.@@@@.@@\n.@@@@@@@.@\n.@.@.@.@@@\n@.@@@.@@@@\n.@@@@@@@@.\n@.@.@@@.@."
# You can run against your own input by dragging your file
# onto this pane and uncommenting the line below.
# &fras"day4.txt" # edit to match the filename.
β(=@@)βΈβ @\n
Nβ β βAβCβ
R β Γ<4βΈ(/+β¬0β»)Nβ
Pβ β /+βR
Pβ β /+β-βΈβ₯(-βΈR)β
Pβ β β₯(β½β10)<1e6/ΓβΈβ³β₯βΈ(-βΈR)β
β(Pβ|Pβ|Pβ)


