Given positive integers n and k, print all binary sequences of length n that contains exactly k ones in lexicographical order.
Two positive integers n and k (n ≥ 1, 0 ≤ k ≤ n).
Print each binary sequence on a separate line. The digits in the sequence must be separated by a single space.