Boxes grasshopper

very basic stuff but stuck, how to make same stuff as in pic (made in rhino) to be made in
grasshopper s.gh (12.0 KB)

This could be one way.


s_re.gh (11.8 KB)

s_reV2.gh (16.1 KB)