Fixing random binary tree, by using a map