Time limit
2s
Memory limit
128 MB
Given integers N, M, and K, consider every length-N sequence of positive integers A1, A2, ..., AN that satisfies both conditions below.
Sort all such sequences in lexicographic order. Print the K-th sequence. The input is guaranteed to have an answer.
The first line contains three integers N, M, and K. (1 <= N <= 10, 1 <= M <= 220, 1 <= K <= 2147483647)
Print the K-th sequence among all length-N sequences whose sum is M, in lexicographic order. Separate adjacent numbers with a single space.