I think the best explanation is my attempt :
\documentclass{report}
\usepackage{amsmath}
\usepackage{graphicx}
\newcommand{\supsub}[2]{\hspace{-0.6em}
\begin{tabular}{c}
{\scriptsize #1} \\[-1.3ex]
{\scriptsize #2}
\end{tabular}\hspace{-0.6em}
}
\begin{document}
This is an example of how the command would be used:
\begin{equation*}
\text{M} \supsub{$a,\dots,a$}{$a,a,\dots,a,a$} \text{M}
\end{equation*}
However, you can see here that the horizontal and vertical
alignment is not quite right:
\begin{equation*}
\text{M} \supsub{$a$}{$a$} \text{M}
\quad
\text{M}^a_a \text{M}
\end{equation*}
The subscript and the superscript are both too low, and are probably
not the correct distance from the ``M''s. I think there is a better way
to do it than eyeballing it and manually changing the dimensions. Also,
it messes up the spacing for inline equations:
$\text{M} \supsub{$a$}{$a$} \text{M}$.
This line has extra vertical space above and below it, as you can see
by this nonsense line that I added just to show you the spacing
around it.
\end{document}