i=99;k;main(n,s)char*s;{for(n=read(0,s,i)-2;i;)printf("%d",!k?k=58-*s:(n<--i?k:98+!!i*k-*s++)%10);}