You are given an undirected and connected graph with n nodes.
Initially, you start at node 1 and need to reach node n.
There are k special nodes that contain power boosters. Every time you arrive at a power booster node, your power is reset to p. This power allows you to traverse at most p edges before needing another booster.