Implement toString for PersistentTree