Imagine a game board and try to get "boundary condition"...
where:
- blue arrows shows "far left" and "far right" cases;
- red arrows shows situation that will never happend (probability 0).
Also imagine "missing of a peg" situation,
where:
- blue arrows shows that ball goes forward to the bottom with the same probability as it has before.
Test case from problem description
1st test case from example input