Okay, so you've started to plan out what you need, that's a good thing. Start trying to code it.
-Can you make the numbers increase over each row.
-Do the counts of the elements in the rows bear any relation to other variables?
Plan out what you want with pencil and paper and then try to translate it into code.