function q(n,a,p,i){if(n<$1)for(i=0;i<$1;i++)index(a,i)+index(p,s=10+i+n)+index(p,t=40+i-n)||q(n+1,n?a" "i:i,p" "s" "t) else print a}q()