import sequtils,algorithm,math,strutils template times*(n:int,body) = (for _ in 0.." .} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': break result = 10 * result + k.ord - '0'.ord let h = scan() let w = scan() var t = scan() let (sy,sx) = (scan(),scan()) let (gy,gx) = (scan(),scan()) if (sx + sy + gx + gy) mod 2 != t mod 2: quit "0.0",0 t .max= 99999 var B = newSeqWith(w,newSeq[char](h)) for y in 0..