trinary tree