Jakub Tarnawski's submission of Tree Fun | CodeChef