Write a program that repeatedly reads two numbers and and prints all bit patterns of length with ones in descending order (when the bit patterns are considered as binary numbers). You may assume that , , and . The first number in the input gives the number of pairs and . The numbers and are separated by a single space. Leading zeroes in a bit pattern should be included. See the example below.
3 2 1 2 0 4 2
The bit patterns are 10 01 The bit patterns are 00 The bit patterns are 1100 1010 1001 0110 0101 0011