You have an board. In how many ways can you cover it with pieces?
Input consists of and . You can assume , and that is even.
Print in lexicographical order all the ways to cover the board. To distinguish the pieces, both cells must have the same lowercase letter, and all the pieces must have different letters. Appart from that, letters should be as small possible. Print an empty line after each solution.
Input
1 2
Output
aa
Input
2 2
Output
aa bb ab ab
Input
2 4
Output
aabb ccdd aabc ddbc abbc addc abcc abdd abcd abcd