BiTree with deserialization