30 chairs
After his unsuccessful attempt to acquire chairs, Ostap remained optimistic and set off on a new quest. He learned of an auction nearby where n antique chairs were up for sale. Eager to try his luck, he decided to see if any hidden treasures might be concealed within one of them. Upon arriving at the auction, Ostap realized he had just enough money to purchase exactly k out of the n chairs. Believing his luckiest number to be m, Ostap seeks your assistance once more. He asks you to determine the m-th combination of k chairs from the n available.
Input
The input file contains the integers n, k, and m. The constraints are 1 ≤ k ≤ n ≤ 30, and 0 ≤ m.
Output
In the output file, list the chair numbers included in the m-th lexicographical combination of k chairs chosen from the numbers 1 to n. The combinations are indexed starting from 0.