\documentclass{amsart}
\begin{document}
\thispagestyle{empty}

\def\l#1{\raise.8em\rlap{\kern.15em$\scriptscriptstyle#1$}(}
\def\r#1{)\raise.8em\llap{$\scriptscriptstyle#1$\kern.15em}}

\let\x\bullet

\begin{align*}
  \x \l1 \x \l2 \x \l3 \x \l4 \x\x \r4\r3\r2\r1 & \to &
  \x \l1\l2\l3\l4 \x\x \r4 \x \r3 \x \r2 \x \r1 & \to
  \\
  \l1 \x\x \r1 \l2 \x \l3 \x \l4 \x\x \r4\r3\r2 & \to &
  \l1 \x \l2\l3\l4 \x\x \r4 \x \r3 \x \r2\r1 \x & \to
  \\
  \l2\l1 \x\x \r1 \x \r2 \l3 \x \l4 \x\x \r4\r3 & \to &
  \l1\l2 \x \l3\l4 \x\x \r4 \x \r3\r2 \x \r1 \x & \to
  \\
  \l3\l2\l1 \x\x \r1 \x \r2 \x \r3 \l4 \x\x \r4 & \to &
  \l1\l2\l3 \x \l4 \x\x \r4\r3 \x \r2 \x \r1 \x & \to
  \\
  \l4\l3\l2\l1 \x\x \r1 \x \r2 \x \r3 \x \r4 \x &&
  \l1\l2\l3\l4 \x\x \r4 \x \r3 \x \r2 \x \r1 \x
\end{align*}

\end{document}

%%%% Notes on the placement of the indices on top of parens

%% Normally 1em = 10pt and
%% width     height     depth
%% 3.8889pt  7.5pt      2.5pt  %  parens ()
%% 3.40283pt 3.22221pt  0.0pt  %  \scriptscriptstyle digits

%% Attach the indices very closely:

\def\l#1{\raise 8pt \rlap{\kern 1.5pt $\scriptscriptstyle#1$}(}
\def\r#1{)\raise 8pt \llap{$\scriptscriptstyle#1$\kern 1.5pt }}

%% Alternative with slightly more space:

\def\l#1{\raise 8.1pt \rlap{\kern 1.6pt $\scriptscriptstyle#1$}(}
\def\r#1{)\raise 8.1pt \llap{$\scriptscriptstyle#1$\kern 1.6pt }}

%% For comparison:  the superscripts

\def\l#1{\mathop(\limits^{\scriptscriptstyle#1}}
\def\r#1{\mathop)\limits^{\scriptscriptstyle#1}}

%% are placed centrally with clearance 2pt, like

\def\l#1{\raise 9.5pt \rlap{\kern 0.243pt $\scriptscriptstyle#1$}(}
\def\r#1{)\raise 9.5pt \llap{$\scriptscriptstyle#1$\kern 0.243pt }}

%%%% With colors

\usepackage{xcolor}

% mygray    % 808080 % gray(128)      % hsv(0,0,50)      % xcolor: gray, black!50
% myblack   % 404040 % gray(64)       % hsv(0,0,25)      % xcolor: darkgray, black!75
% myred     % FF0000 % rgb(255,0,0)   % hsv(0,100,100)   % xcolor: red
% mygreen   % 00FF00 % rgb(0,255,0)   % hsv(120,100,100) % xcolor: green
% myblue    % 0000FF % rgb(0,0,255)   % hsv(240,100,100) % xcolor: blue
% myorange  % FF8000 % rgb(255,128,0) % hsv(30,100,100)  % 30=120-90
% mycyan    % 0080FF % rgb(0,128,255) % hsv(210,100,100) % 210=120+90=240-30

\colorlet{mygray}{gray}
\colorlet{myblack}{darkgray}
\colorlet{myred}{red}
\colorlet{mygreen}{green}
\colorlet{myblue}{blue}
\definecolor{myorange}{HTML}{FF8000}
\definecolor{mycyan}{HTML}{0080FF}

\def\c#1{\def\x{{\color{#1} \bullet}}}

%% no colors
% \def\c#1{}

\begin{align*}
  \c{myred}
  \x \l1 \x \l2 \x \l3 \x \l4 \x\x \r4\r3\r2\r1 & \to &
  \c{mygray}
  \x \l1\l2\l3\l4 \x\x \r4 \x \r3 \x \r2 \x \r1 & \to
  \\
  \c{myred}
  \l1 \x\x \r1 \l2 \x \l3 \x \l4 \x\x \r4\r3\r2 & \to &
  \c{mygray}
  \l1 \x \l2\l3\l4 \x\x \r4 \x \r3 \x \r2\r1 \x & \to
  \\
  \c{myred}
  \l2\l1 \x\x \r1 \x \r2 \l3 \x \l4 \x\x \r4\r3 & \to &
  \c{myblack}
  \l1\l2 \x \l3\l4 \x\x \r4 \x \r3\r2 \x \r1 \x & \to
  \\
  \c{myred}
  \l3\l2\l1 \x\x \r1 \x \r2 \x \r3 \l4 \x\x \r4 & \to &
  \c{mycyan}
  \l1\l2\l3 \x \l4 \x\x \r4\r3 \x \r2 \x \r1 \x & \to
  \\
  \c{myred}
  \l4\l3\l2\l1 \x\x \r1 \x \r2 \x \r3 \x \r4 \x &&
  \c{myred}
  \l1\l2\l3\l4 \x\x \r4 \x \r3 \x \r2 \x \r1 \x
\end{align*}

%%%%%%

%% png creation (normal size, transparent)

%%% pdflatex cube-4-labels.tex
%%% pdftocairo -png -singlefile -transp -r 200 cube-4-labels.pdf tmp
%%% magick -define png:exclude-chunk=date,time tmp.png -trim +repage cube-4-labels.png
%%% optipng cube-4-labels.png

%%%% magick adds white (fallback) background for the transparent image
%%%% and has the convenient option -trim.

%% png creation (large size)

%%% pdflatex cube-4-labels.tex
%%% pdftocairo -png -singlefile -r 722 -W 2273 -H 1011 -x 1932 -y 1264 cube-4-labels.pdf cube-4-labels-large
%%% optipng cube-4-labels-large.png

%%%% The resolution 722 translates 1pt to 10 pixels (with a precision of 0.1%).

%% program versions

%%% This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)

%%% pdftocairo version 0.86.1
%%% ImageMagick 7.1.1-43 Q16-HDRI x86_64 22550 https://imagemagick.org
%%% OptiPNG version 0.7.7

%%%%%%
