Abstract Tree implemented in Python