Proof - Uniqueness part of unique factorization theorem The uniqueness part of the unique factorization theorem for integers says that given any integer $n$, if $n=p_1p_2 \ldots p_r=q_1q_2 \ldots q_s$ for some positive integers $r$ and $s$ and prime numbers $p_1 \leq p_2 \leq \cdots \leq p_r$ and $q_1 \leq q_2 \leq \cdots \leq q_s$, then $r=s$ and $p_i=q_i$ for all integers $i$ with $1 \leq i \leq r$.
Fill in the details of the following sketch of a proof: Suppose that $n$ is an integer with two different prime factorizations: $n=p_1p_2 \ldots p_t =q_1q_2 \ldots q_u$. All the prime factors that appear on both sides can be cancelled (as many times as they appear on both sides) to arrive at the situation where  $p_1p_2 \ldots p_r=q_1q_2 \ldots q_s$, $p_1 \leq p_2 \leq \cdots \leq p_r$, $q_1 \leq q_2 \leq \cdots \leq q_s$ , and $p_i \neq q_j$ for any integers $i$ and $j$. Then deduce a contradiction, and so the prime factorization of $n$ is unique except, possibly, for the order in which the prime factors are written.
Please provide as much detail as possible. I'm very confused about this. I know I'll need Euclid's Lemma at some point in the contradiction, but I have no idea how to arrive there.

The OP can simply state in their proof that they 'arrived' at the following 'situation':
$\tag 1 n = p_1p_2 \ldots p_r \text{ and } n=q_1q_2 \ldots q_s \text{ and } p_i \neq q_j \text { for any integers } i \text{ and } j$
In words, there exist an integer $n$ with two prime factorizations containing no common prime factors.
We now demonstrate that being left in such a 'situation' is untenable by using the following 'tweak' of Euclid's lemma:
If $p$ is a prime number dividing into $a_1 \dots a_z$ then there exist a subscript $k$ such that $p$ divides $a_k$.
The integer $n$ in $\text{(1)}$ has a smallest prime number, call it $\gamma(n)$, that divides into it. By applying Euclid's lemma to $n = p_1p_2 \ldots p_r$, we must conclude that there exist a subscript $i$ with $\gamma(n) = p_i$. Similarly, there exist a subscript $j$ with $\gamma(n) = q_j$. But this contradicts $\text{(1)}$.

The above proof is similar to Falko's, but since it has more detail and introduces the concept of $\gamma(n)$, I decided to post it. (I just upvoted Falko's answer).
