reconstruction of a binary tree