In the absence of a minimal working example, it is hard to be terribly helpful. (Where is S? Where did you try that code?) This is, of course, especially frustrating when it is obvious from your question that you do, in fact, have code and have simply chosen not to share it so that people have to start from scratch. This is less likely to be helpful, of course, since we can only guess what the problem might be.
That said, the image you posted can be easily drawn using the chains library and a simple loop, with a couple of tweaks to accommodate the start and end of the chain. The quotes library is used for the labelling. scopes is not really needed here but it is useful when using chains so I've included it in case your diagram grows in complexity.
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{chains,scopes,quotes,arrows.meta}
\begin{document}
\begin{tikzpicture}
[
start chain=main going right,
every on chain/.append style={minimum width=25mm, minimum height=10mm, draw=green!50!yellow!60, thick, text centered},
every join/.append style={-{Triangle[]}, draw=blue!50!cyan, thick},
node distance=20mm
]
\node (in) [shape=coordinate] {};
{
\chainin (in);
\foreach \i/\j in {A/{$a=(b,c)$},B/{$x$},C/{$y$},D/{$z$}}
\node (\i) [on chain, join=by {"\j"}] {\i};
\node (out) [every on chain/.append style={draw=none, minimum width=0pt, minimum height=0pt}, on chain, join=by {"a"} ] {};
}
\end{tikzpicture}
\end{document}

=in the node text, you need to wrap the whole text in{...}(soinitial text={$a=(b,c)$}) – Jake Dec 23 '15 at 09:24