Alice Bob go celebrate Christmas playing game tree present the tree n node number 1 n node r root there a_i present hang ith nodebefore begin game special integer k choose the game proceed follow Alice begin game move alternate turn current player choose node example depth k then player pick positive number present hang node let m 1 le m le a_i player place m presents kth ancestor let j ith node kth ancestor vertex vertex j descendant j difference depth j depth exactly k now number present ith node a_i decrease m correspondingly a_j increase m Alice Bob play optimally the player unable lose gameFor possible root tree find Alice Bob win gamenote the depth node tree root r define number edge simple path node r node the depth root r zero