define n endef f=$(if $1,$(n$2)$g$(call f,$(wordlist 2,1000,$1),$(subst $h,,$2$2$2$(wordlist 4,1$g,$h$h$h) ))) g=$(word 1,$1) h=x x x x x x x 1=$(STDIN) 2=$h $(foreach i,0 1 2 3 4 5 6 7 8 9,$(eval 1=$(subst $i,$i ,$1)))$(info $f)
Note that non-ascii characters in the above source code will be escaped (such as \x9f).