int i,j=0;main(n){for(printf("Gray code n=%d",n=atoi(gets()));i<1<n?"\n":"%d",(i^i*2)>>j&1);}