Here is an answer based on checking:https://tikz.dev/tikz-shapes#sec-17.9 suggested by MS-SPO.
\begin{tikzpicture}\matrix[matrix of math nodes,inner sep=1pt,row sep=1em,column sep=1em] (M){& A & B & C \\& E & F & G \\};\draw[ ->] (M-1-2.east) -- (M-1-3.west) node[midway,above,pos=0.3]{\,\tiny ab};\draw[ ->] (M-1-3.east) -- (M-1-4.west) node[midway,above,pos=0.3]{\,\tiny bc};\end{tikzpicture}