How would you solve a mirror reflection maze?

lorum ipsum. orum ipson

Do you have any idea how to implement the graph? I’ve never used graphs before and the conditions makes it very complicated. I also posted the link if you want to see the problem for yourself.