Let $R_i$ is an ordinal for every $i\in n$ (where $n$ is also an ordinal) and $S_{i,j}$ is an ordinal for every $i\in n$ and $j\in m_i$ (where $m_i$ is also an ordinal for every $i\in n$).
What is a formula for the ordinal representing the pair $(R_i;S_{i,j})$ in the lexicographic order of pairs?