yes sorry I did don specify that so the condition is:
"always starting from the left upper corner going right then down"
I understand rectangles would be easier but i need squares as then i can mark the coordinate with one number only. I'll post the solution in te initial post so ppl do not need to read the conversation through ... And thnx!!