409428: GYM103540 B Gift
Description
You want to give your friend a gift on his birthday. The gift is a box of $$$n$$$ candies. You went to a candy shop and there are $$$m$$$ flavors of candy. The $$$i$$$th flavor is defined by the $$$i$$$th letter in the alphabet. i.e. first flavor is defined by $$$a$$$, second flavor is defined by $$$b$$$, third flavor is defined by $$$c$$$, $$$\cdots$$$ and so on.
Print all possible choices for candy box. Two candy box will be different if for any $$$i$$$, $$$i$$$th candy flavor in two boxes are different.
Print them in lexicographic order.
InputOnly line in the input contains two integers, $$$n$$$, $$$m$$$ ($$$1 \leq n \leq 9$$$, $$$1 \leq m \leq 6$$$)
OutputFirst line of the output should contain one integer $$$k$$$ — number of possible choices.
Each of the next $$$k$$$ lines should contain a string of length $$$n$$$ denoting the choice. They should be in lexicographic order.
ExamplesInput3 2Output
8 aaa aab aba abb baa bab bba bbbInput
1 1Output
1 aInput
1 2Output
2 a b