private Node addToTree(Node root, int v) {
		if (root == null) {
			return new Node(v);
		}
		Node curr = root;
		Node prev = null;
		int left = -1;
		while (curr != null) {
			if (curr.v < v) {
				prev = curr;
				curr = curr.right;
				left = 0;
			} else if (curr.v == v) {
				return root;
			} else {
				prev = curr;
				curr = curr.left;
				left = 1;
			}
		}
		if (left == 1) {
			prev.left = new Node(v);
		} else {
			prev.right = new Node(v);
		}
		return root;
	}