p F[gets.hex]while F=->a,b=a+1,r=0{a<1||b>(x=a%t=16**r+=1)&&x>t/17&&F[a/t,x]?r:r<11&&redo}