Snake ladders doubt


sir my 1 testcase is failing and giving wrong answer please help