Suppose that you have an infinite suply of rectangles for every natural . You have to exactly cover an square (you can choose ) by placing of those rectangles horizontally or vertically. For instance, these are some ways for , and :
(10,6)
(0,0)(0,1)(2,1)(2,0) (0,1)(0,2)(2,2)(2,1)
(4,0)(4,4)(6,4)(6,0) (6,0)(6,2)(7,2)(7,0) (7,0)(7,2)(8,2)(8,0) (6,3)(6,4)(8,4)(8,3) (6,2)(6,3)(8,3)(8,2)
(10,0)(10,4)(12,4)(12,0) (10,4)(10,6)(14,6)(14,4) (14,2)(14,6)(16,6)(16,2) (12,0)(12,2)(16,2)(16,0) (12,2)(12,3)(14,3)(14,2) (12,3)(12,4)(14,4)(14,3)
There are only a few for which it is impossible to cover a square with such rectangles. In particular, it is always possible when . Can you prove it?
Input consists of several such that . Assume .
For every , first print a line with an between 2 and 30. Afterwards, print lines with characters each. Use different digits, lowercase letters and uppercase letters to indicate each rentangle. Since there are multiple possible solutions, print any one.
Input
2 2 14
Output
2 00 11 6 ZZZaaa ZZZaaa ZZZaaa ZZZaaa ZZZaaa ZZZaaa 8 C3POjj42 C3POdd42 BBBBBBBB BBBBBBBB BBBBBBBB BBBBBBBB T1111XX5 T1111YY5