How can I get this in progamatically ?
quares can share edges and also do not consider nested squares