i,j,s,a[1<<17];main(n){for(gets(&n);~scanf("%d",&n);a[i++]=n)for(j=0;j