var i,j,n,m,s,t,k,test:longint; x:array[1..3,1..2] of longint; y:array[1..3] of boolean; num,nu:int64; procedure go(s,t,ci,zh:longint); var i:longint; begin if zh+abs(s-t)