A three-layer transformer network, for example, would be denoted s fs f s f, with the flow of computation moving from input on the left to output on the right.
any string in the regular language (s|f) * defines a valid network that uses the same building blocks as the original transformer.