Solution with recurisve algorithm
video of graph of allowed transitions in ToH, which has fractal structure and show why the recursive approach is natural