public TreeNode goFlat(TreeNode root) {
		if (root.left == null && root.right == null) {
			return root;
		}
		TreeNode rightNode = null;
		TreeNode leftNode = null;
		if (root.right != null) {
			rightNode = goFlat(root.right);
		}
		TreeNode leftMostRighTreeNode = root;
		if (root.left != null) {
			leftNode = goFlat(root.left);
			root.left = null;
			root.right = leftNode;
			leftNode.left = null;
			// leftNode.right = rightNode;
			while (leftMostRighTreeNode.right != null) {
				leftMostRighTreeNode = leftMostRighTreeNode.right;
			}
		}
		if (rightNode != null) {
			leftMostRighTreeNode.right = rightNode;
			rightNode.left = null;
		}
		return root;
	}