There are 7 ways to write the integer 4 as a sum of 1, 2, and 3. Every sum uses at least one number.
1+1+1+1
1+1+2
1+2+1
2+1+1
2+2
1+3
3+1
Sorted in lexicographic order, they come out in this order.
1+1+1+1
1+1+2
1+2+1
1+3
2+1+1
2+2
3+1
Given integers n and k, write a program that finds the expression ranked k-th in lexicographic order among the ways to write n as a sum of 1, 2, and 3.
Input
The first line contains two integers n and k separated by a space. n is a positive integer smaller than 11, and k is a natural number at most 231−1.
Output
Print the expression ranked k-th in lexicographic order among the ways to write n as a sum of 1, 2, and 3. Do not put spaces around the plus signs. If there is no k-th expression, print -1.