Given n. Create an nXn matrix with the following structure: On the main diagonal, 1 and 2 alternate. Further from each cell of the main diagonal to the right and down, the same numbers are placed as in this cell itself.
The matrix should look like this:
1 1 1 1 1 1
1 2 2 2 2 2
1 2 1 1 1 1
1 2 1 2 2 2
1 2 1 2 1 1
1 2 1 2 1 2