public String tree2str(TreeNode t) {
String left = tree2str(t.left);
String right = tree2str(t.right);
if (left == "" && right == "") {
return res + "()" + "(" + right + ")";
return res + "(" + left + ")";
return res + "(" + left + ")" + "(" + right + ")";