Why nao working (SS4 - Naruto Run)

https://www.codechef.com/viewsolution/27637789

if there are 20 nodes…can we guarantee than node 2 is at level 2 of tree
?

No.
20 char limit.