$><<'Gray code n=' p n=getc-48 (2**n).times{|v|puts"%0#{n}b".%v^v/2}