You have received a calendar cube for your birthday! Fascinated by the fact that each day of the month could be constructed by using the two cubes in a specific orientation, you got an idea. You ordered $$$n$$$ cubes online. Each cube has some digit written on each of its six faces. Digits may repeat within a cube.
Two number cubes forming the number $$$25$$$. Your curious mind begins to wonder: what are the $$$k$$$ smallest numbers that cannot be obtained by using some of the $$$n$$$ cubes in a specific orientation? Numbers must not contain leading zeros. Note that you can choose to not use some cube if you don't want to.
The first line of the input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \leq n \leq 100$$$, $$$1 \leq k \leq 10^5$$$).
Each of the following $$$n$$$ lines contains exactly six numbers between $$$0$$$ and $$$9$$$ inclusively, representing the digits written on each of the six faces of the cubes.
Output the smallest $$$k$$$ positive numbers that cannot be obtained using the cubes, separated by space. The numbers must not contain leading zeros, and must be sorted in increasing order.
2 3 1 8 7 0 6 2 1 2 5 4 9 3
33 34 35
1 10 1 5 2 2 6 4
3 7 8 9 10 11 12 13 14 15
4 10 1 5 7 1 2 4 0 1 5 8 9 4 3 5 2 2 7 8 6 1 7 0 2 2
33 66 99 133 166 199 233 266 299 303