Tree In Python Implementation