int secondLargest(TreeNode node) {
		if (node==null||(node.right==null&&node.left==null)) throw new IllegalArgumentException();
		if (node.right!=null) {
			TreeNode p=node,c=node.right;
			while (c.right!=null) {p=c;c=c.right;}
			node=p;
		} else {
			TreeNode c=node.left;
			while (c.right!=null) c=c.right;
			node=c;
		}
		return node.val;
	}