var m,j:comp;b:string;procedure f(n,i:word);label 1;begin repeat for j:=0to n-1do if i-ord(b[2*j+1])+48in[0,n-j,j-n]then goto 1;str(b:-2*n,i,b);if n