private TreeNode findParent(TreeNode target, TreeNode root) {
		if (root == null) {
			return null;
		}
		if (root.left == target || root.right == target) {
			return root;
		} else {
			TreeNode left = findParent(target, root.left);
			if (left != null && (left.left == target || left.right == target)) {
				return left;
			}
			TreeNode right = findParent(target, root.right);
			if (right != null && (right.left == target || right.right == target)) {
				return right;
			}
		}
		return null;
	}