Tree implemented in python.