Partitioning for Fun and Profit

Time limit2sMemory limit128 MB

Problem

A partition of a positive integer m into n elements (where nm) is a sequence of positive integers a₁, ..., aₙ such that a₁ + ... + aₙ = m and a₁a₂ ≤ ... ≤ aₙ. Your task is to find the partition of m that occupies the k-th position in the lexicographically ordered list of all partitions of m into n elements.

The lexicographic order on partitions is defined as follows. For two partitions a = [a₁, ..., aₙ] and b = [b₁, ..., bₙ] of m into n elements, we have a < b if and only if there is an index 1 ≤ in such that aⱼ = bⱼ for every j < i and aᵢ < bᵢ. Partitions are listed in increasing lexicographic order, so the very first one is 1, 1, ..., 1, mn + 1.

Input

The first line contains an integer c, the number of test cases. Each of the next c lines contains three integers m, n, and k with 1 ≤ m ≤ 220, 1 ≤ n ≤ 10, and 1 ≤ k, where k is at most the number of partitions of m into n elements.

Output

For each test case, print the k-th partition of m into n elements. Print each element of the partition on its own line.