read*,n;print'("Gray code n="i0,9999a1)',n,(10,(ibits(i+2**j/2,j,1)+48,j=n,1,-1),i=0,2**n-1);end