Hi,
There are a few ways you could do this, and really it depends how you are setting up the rest of the style. If the stairs are to be a separate generator, then it probably easiest to use the Top and Bottom inputs with the repeating section in the default. If you need to center the stairs along the side of the building , you could use the X Evenly input and use the Segment Y Role marker to target the top and bottom in a similar way.
If however you already have segments using the Top and Bottom inputs, then things are a little trickier. In this case you can use a Conditional operator testing Y Segment count to place the bottom part. The mid part is easy, but the top is a bit awkward. It can be achieved using expressions. Using XSplineLength and XSplinePosition you can find home much space remains in the spline at each segment.
YSplineLength-YSplineLength*YSplinePosition
One we know that we can check to see if the segment is smaller than the size of a single segment using a IF statement as follows
return if(YSplineLength-YSplineLength*YSplinePosition<=Input1+Input2,2,1);
Input 1 and Input 2 are the sizes of the Top segments (assuming you also have a frieze)
If the space remaining in the spline is equal or smaller than the size of a segment then the number 2 is returned, otherwise the expressions returns 1. This can then be wired to the Index property of a Selector node to switch between segments.
This is easier to show than explain, so I've attached a sample file for you to take a look at. It also includes the other two methods mentioned above.
Thanks,
Paul