# Different alignments in {align*} formula

I have problem with creating formula with different alignments. I want to create some kind of 'permutation dependings diagram'. Code witch I created so far:

\begin{align*}
&(1, 2, 3, 4, 5, 6) \\
&(2, 5, 1, 6, 4, 3) \xleftrightarrow{\text{s}} (3, 1, 6, 5, 2, 4)\\
\updownarrow{\text{o}}
\end{align*}


Output:

Expected output:

I want to have permutations in two vertical lines - all "(...)" have to be in two vertical lines. Second thing is that I don't know how can I make vertical arrow in the middle of permutations - in the middle of text: "(2, 5, 1, 6, 4, 3)" and second one "(3, 1, 6, 5, 2, 4)"

There is any simple way to prepare diagram like this on handwritten picture?

There does not seem to be a need for align here, as you can set this using an array and choose your alignments:

\documentclass{article}

\usepackage{amsmath,extarrows}

\begin{document}

$\renewcommand{\arraystretch}{1.2}% Spread array out vertically \begin{array}{ *{3}{c} } (1, 2, 3, 4, 5, 6) \\ (2, 5, 1, 6, 4, 3) & \xleftrightarrow{\text{s}} & (3, 1, 6, 5, 2, 4) \\ \updownarrow \raisebox{.1em}{\scriptsize o} & & \updownarrow \raisebox{.1em}{\scriptsize o} \\ (5, 3, 6, 2, 4, 1) & & (5, 1, 4, 6, 3, 2) \\ \updownarrow \raisebox{.1em}{\scriptsize s} & & \updownarrow \raisebox{.1em}{\scriptsize s} \\ (6, 4, 2, 5, 1, 3) & & (2, 6, 5, 3, 1, 4) \\ \vdots & & \vdots \\ (6, 5, 4, 3, 2, 1) & \xleftrightarrow{\text{s}} & (6, 5, 4, 3, 2, 1) \end{array}$

\end{document}


You can play around with the spacing between columns or rows.

If it can rest on the same page, array seems to be the simplest solution (a starting point}:

\documentclass{article}
\usepackage{amsmath}
\usepackage{extarrows}

\begin{document}

$\begin{array}{ccc} (1, 2, 3, 4, 5, 6)&& \\ (2, 5, 1, 6, 4, 3)& \xleftrightarrow{\text{s}}& (3, 1, 6, 5, 2, 4)\\ \updownarrow{\text{o}}&&\\ \text{etc.} & \text{etc.}&\text{etc.}\\ \vdots&&\vdots \end{array}$

\end{document}