Jakub Tarnawski's submission of Tree | CodeChef