a[4000][4000];*p=a,*q;M=4e3,s;main(t){for(;t=~getchar();q++)t+36?t&4?q=p+=M:0:s<(q[M+1]=((t=q[M])