Niyaz Nigmatullin's submission of Tree Fun | CodeChef