Build a binary tree