from collections import deque
def printBinaryNumbers(n):
q = deque()
q.append('1')
for i in range(n):
first = str(q.popleft())
q.append(first + '0')
q.append(first + '1')
print(first)
N = 15
printBinaryNumbers(N)
'''
run:
1
10
11
100
101
110
111
1000
1001
1010
1011
1100
1101
1110
1111
'''