Existence: A morphism with all the properties listed exists by combining Lemmas \ref{lemma-contracting-rational-tails} and \ref{lemma-contracting-rational-bridges} as discussed in the introduction to this section. Moreover, we see that it can be written as a composition $$ X \to X_1 \to X_2 \ldots \to X_n \to X_{n + 1} \to \ldots \to X_{n + n'} $$ where the first $n$ morphisms are contractions of rational tails and the last $n'$ morphisms are contractions of rational bridges. Note that property (2) holds for each contraction of a rational tail (Example \ref{example-rational-tail}) and contraction of a rational bridge (Example \ref{example-rational-bridge}). It is easy to see that this property is inherited by compositions of morphisms. \medskip\noindent Uniqueness: Let $c : X \to Y$ be a morphism satisfying conditions (1), (2), and (3). We will show that there is a unique isomorphism $X_{n + n'} \to Y$ compatible with the morphisms $X \to X_{n + n'}$ and $c$. \medskip\noindent Before we start the proof we make some observations about $c$. We first observe that the fibres of $c$ are geometrically connected by More on Morphisms, Theorem \ref{more-morphisms-theorem-stein-factorization-Noetherian}. In particular $c$ is surjective. For a closed point $y \in Y$ the fibre $X_y$ satisfies $$ H^1(X_y, \mathcal{O}_{X_y}) = 0 \quad\text{and}\quad H^0(X_y, \mathcal{O}_{X_y}) = \kappa(y) $$ The first equality by More on Morphisms, Lemma \ref{more-morphisms-lemma-check-h1-fibre-zero} and the second by More on Morphisms, Lemma \ref{more-morphisms-lemma-h1-fibre-zero-check-h0-kappa}. Thus either $X_y = x$ where $x$ is the unique point of $X$ mapping to $y$ and has the same residue field as $y$, or $X_y$ is a $1$-dimensional proper scheme over $\kappa(y)$. Observe that in the second case $X_y$ is Cohen-Macaulay (Lemma \ref{lemma-automatic}). However, since $X$ is reduced, we see that $X_y$ must be reduced at all of its generic points (details omitted), and hence $X_y$ is reduced by Properties, Lemma \ref{properties-lemma-criterion-reduced}. It follows that the singularities of $X_y$ are at-worst-nodal (Lemma \ref{lemma-closed-subscheme-nodal-curve}). Note that the genus of $X_y$ is zero (see above). Finally, there are only a finite number of points $y$ where the fibre $X_y$ has dimension $1$, say $\{y_1, \ldots, y_r\}$, and $c^{-1}(Y \setminus \{y_1, \ldots, y_r\})$ maps isomorphically to $Y \setminus \{y_1, \ldots, y_r\}$ by $c$. Some details omitted; hint: outside of $\{y_1, \ldots, y_r\}$ the morphism $c$ is finite, see Cohomology of Schemes, Lemma \ref{coherent-lemma-characterize-finite}. \medskip\noindent Let $C \subset X$ be a rational tail. We claim that $c$ maps $C$ to a point. Assume that this is not the case to get a contradiction. Then the image of $C$ is an irreducible component $D \subset Y$. Recall that $H^0(C, \mathcal{O}_C) = k'$ is a finite separable extension of $k$ and that $C$ has a $k'$-rational point $x$ which is also the unique intersection of $C$ with the ``rest'' of $X$. We conclude from the general discussion above that $C \setminus \{x\} \subset c^{-1}(Y \setminus \{y_1, \ldots, y_r\})$ maps isomorphically to an open $V$ of $D$. Let $y = c(x) \in D$. Observe that $y$ is the only point of $D$ meeting the ``rest'' of $Y$. If $y \not \in \{y_1, \ldots, y_r\}$, then $C \cong D$ and it is clear that $D$ is a rational tail of $Y$ which is a contradiction with the ampleness of $\omega_Y$ (Lemma \ref{lemma-rational-tail-negative}). Thus $y \in \{y_1, \ldots, y_r\}$ and $\dim(X_y) = 1$. Then $x \in X_y \cap C$ and $x$ is a smooth point of $X_y$ and $C$ (Lemma \ref{lemma-closed-subscheme-nodal-curve}). If $y \in D$ is a singular point of $D$, then $y$ is a node and then $Y = D$ (because there cannot be another component of $Y$ passing through $y$ by Lemma \ref{lemma-closed-subscheme-nodal-curve}). Then $X = X_y \cup C$ which means $g = 0$ because it is equal to the genus of $X_y$ by the discussion in Example \ref{example-rational-tail}; a contradiction. If $y \in D$ is a smooth point of $D$, then $C \to D$ is an isomorphism (because the nonsingular projective model is unique and $C$ and $D$ are birational, see Section \ref{section-curves-function-fields}). Then $D$ is a rational tail of $Y$ which is a contradiction with ampleness of $\omega_Y$. \medskip\noindent Assume $n \geq 1$. If $C \subset X$ is the rational tail contracted by $X \to X_1$, then we see that $C$ is mapped to a point of $Y$ by the previous paragraph. Hence $c : X \to Y$ factors through $X \to X_1$ (because $X$ is the pushout of $C$ and $X_1$, see discussion in Example \ref{example-rational-tail}). After replacing $X$ by $X_1$ we have decreased $n$. By induction we may assume $n = 0$, i.e., $X$ does not have a rational tail. \medskip\noindent Assume $n = 0$, i.e., $X$ does not have any rational tails. Then $\omega_X^{\otimes 2}$ and $\omega_X^{\otimes 3}$ are globally generated by Lemma \ref{lemma-no-rational-tail-semiample-genus-geq-2}. It follows that $H^1(X, \omega_X^{\otimes 3}) = 0$ by Lemma \ref{lemma-vanishing-twist}. By Lemma \ref{lemma-contract-gorenstein-canonical} applied with $m = 3$ we find that $c^*\omega_Y \cong \omega_X$. We also have that $\omega_X = (X \to X_{n'})^*\omega_{X_{n'}}$ by Lemma \ref{lemma-rational-bridge-canonical} and induction. Applying the projection formula for both $c$ and $X \to X_{n'}$ we conclude that $$ \Gamma(X_{n'}, \omega_{X_{n'}}^{\otimes m}) = \Gamma(X, \omega_X^{\otimes m}) = \Gamma(Y, \omega_Y^{\otimes m}) $$ for all $m$. Since $X_{n'}$ and $Y$ are the Proj of the direct sum of these by Morphisms, Lemma \ref{morphisms-lemma-proper-ample-is-proj} we conclude that there is a canonical isomorphism $X_{n'} = Y$ as desired. We omit the verification that this is the unique isomorphism making the diagram commute.