grid with alternate number of items row

I got a UI design acutally from a printing press, there is a section, with multiple items and they are arranged like 3 items in odd rows, and 4 items in even rows:
i.e.
3 in first row
4 in second row
3 in third row and so on


how can I build it using css flexbox or grid ?
image.png
Was this page helpful?