m:-prompt1(''),readln([N]),format("Gray code n=~d ",N),A is 2^N-1,between(0,A,X),\+format("~`0t~2r~*+ ",[X xor(X//2),N]).