b,c=gets.scan(/\w+/).map(&:to_i) d=b+c-1 (2**d).times do|i| _=sprintf"%b",2**d+i _.tr!('10','|*') c!=(_.count"|")||(puts _[1,10])end