A Takuzu grid is a 2n X 2n zero-one matrix with the following properties:
1. Every row and every column has n zeros and n ones.
2. No row or column has three consecutive zeros or three consecutive ones.
3. All rows are distinct, and all columns are distinct (but a row may be the same as a column).