define(f,`Gray code n=$1g($1,0)')define(g,`ifelse(eval(1<<$1),$2,,format(%0*d ,$1,eval($2^$2/2,2))`g($1,incr($2))')')f(include(/dev/fd/0))