Consider the set $\mathbb{N}^k$ of $k$-tuples of natural numbers ordered lexicographically. This corresponds to the ordinal number $\omega^k$.
What ordinal number corresponds to $(n_1,\ldots,n_k) \in \mathbb{N}^k$?
I conjecture that $(n_1,\ldots,n_k)$ corresponds to the ordinal $n_1 \cdot \omega^{k-1}+\ldots+ n_{k-1} \cdot \omega +n_k$.
Remember that ordinal multiplication is NOT commutative.
You don't want $n_{k-1} \cdot \omega$ because that equals $\omega$.
You should write
$$\omega^{k-1} \cdot n_1+\cdots+ \omega \cdot n_{k-1} +n_k$$