ll@n,@m,@a[m],d[n],p=0; rep(i,n)d[i]=i; rrep[a](x,m){ swap(d[x-1],d[x]); p+=(p==x-1)-(p==x); rep(i,n)d[i]