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() let t = scan() let (sy,sx) = (scan(),scan()) let (gy,gx) = (scan(),scan()) var B = newSeqWith(w,newSeqWith(h,'.')) for y in 0..