Olya loves energy drinks. She loves them so much that her room is full of empty cans from energy drinks.

Formally, her room can be represented as a field of *n* × *m* cells, each cell of which is empty or littered with cans.

Olya drank a lot of energy drink, so now she can run *k* meters per second. Each second she chooses one of the four directions (up, down, left or right) and runs from 1 to *k* meters in this direction. Of course, she can only run through empty cells.

Now Olya needs to get from cell (*x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>) to cell (*x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub>). How many seconds will it take her if she moves optimally?

It's guaranteed that cells (*x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>) and (*x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub>) are empty. These cells can coincide.
The first line contains three integers *n*, *m* and *k* (1 ≤ *n*, *m*, *k* ≤ 1000) — the sizes of the room and Olya's speed.

Then *n* lines follow containing *m* characters each, the *i*-th of them contains on *j*-th position "#", if the cell (*i*, *j*) is littered with cans, and "." otherwise.

The last line contains four integers *x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub> (1 ≤ *x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub> ≤ *n*, 1 ≤ *y*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">2</sub> ≤ *m*) — the coordinates of the first and the last cells.
In the first sample Olya should run 3 meters to the right in the first second, 2 meters down in the second second and 3 meters to the left in the third second.

In second sample Olya should run to the right for 3 seconds, then down for 2 seconds and then to the left for 3 seconds.

Olya does not recommend drinking energy drinks and generally believes that this is bad.
3 4 4
....
###.
....
1 1 3 1
3
3 4 1
....
###.
....
1 1 3 1
8
2 2 1
.#
#.
1 1 2 2
-1
10 10 1
##########
#.........
#.#######.
#.#.....#.
#.#.###.#.
#.#.#.#.#.
#.#.#.#.#.
#.#.#...#.
#.#.#####.
#.#.......
6 6 10 2
48
10 10 3
##########
##########
##########
##########
##########
##########
##########
#########.
#########.
####..###.
10 6 10 5
1
10 10 3
...##..#..
#.#..#...#
..#.##.#..
##..#..#.#
..#...##..
.#.#.#....
#......#..
.#.####.##
......#...
.#.##...##
4 6 8 1
7
10 10 1000
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
7 6 1 3
2
10 10 1000
..........
..........
..........
..........
..........
..........
..........
..........
..........
.....#....
3 9 5 1
2
10 10 10
...#......
##.#.#####
...#...###
.#####.###
...#...###
##.#.#####
...#...###
.#####.###
.......###
##########
1 1 1 10
17
2 5 5
#####
##.##
2 3 2 3
0
4 4 4
...#
.#.#
....
##..
1 1 3 4
2
6 6 100
....##
.##.##
.##.##
......
###.##
###.##
1 1 4 6
2
sta = input().split()
n = int(sta[0])
m = int(sta[1])
k = int(sta[2])

puzzle = []
for i in range(n):
    puzzle.append([x for x in input()])

axis = input().split()
x_0 = int(axis[0])-1
y_0 = int(axis[1])-1

x_1 = int(axis[2])-1
y_1 = int(axis[3])-1

solve = []
for i in range(n):
    tmp = []
    for j in range(m):
        tmp.append(m * n)
    solve.append(tmp)

num = 1

solve[x_0][y_0] = 1

flag1 = 0
flag2 = 0
flag3 = 0
flag4 = 0


for z in range(k):
    i = x_0
    j = y_0
    if i - z-1 >= 0 and puzzle[i - z-1][j] != '#' and flag1 == 0 and solve[i - z-1][j] > num:
        solve[i - z-1][j] = num
    elif i + z+1 <= n-1 and puzzle[i + z+1][j] != '#' and flag2 == 0 and solve[i + z+1][j] > num:
        solve[i + z+1][j] = num
    elif j - z-1 >= 0 and puzzle[i][j - z-1] != '#' and flag3 == 0 and solve[i][j - z-1] > num:
        solve[i][j - z-1] = num
    elif j + z+1 <= m-1 and puzzle[i][j + z+1] != '#' and flag4 == 0 and solve[i][j + z+1] > num:
        solve[i][j + z+1] = num
    if i - z-1 >= 0 and puzzle[i - z-1][j] == '#' and flag1 == 0:
        flag1 += 1
    elif i + z+1 <= n-1 and puzzle[i + z+1][j] == '#' and flag2 == 0:
        flag2 += 1
    elif j - z-1 >= 0 and puzzle[i][j - z-1] == '#' and flag3 == 0:
        flag3 += 1
    elif j + z+1 <= m-1 and puzzle[i][j + z+1] == '#' and flag4 == 0:
        flag4 += 1
flag1 = flag2 = flag3 = flag4 = 0

num += 1

while solve[x_1][y_1] == m*n:
    a = []
    b = []
    for i in range(n):
        for j in range(m):

            if solve[i][j] == num-1:
                a.append(i)
                b.append(j)

    for q in range(len(a)):
        i = a[q]
        j = b[q]
        for z in range(k):
            if i - z - 1 >= 0 and puzzle[i - z - 1][j] != '#' and flag1 == 0 and solve[i - z - 1][j] > num:
                solve[i - z - 1][j] = num
            elif i + z + 1 <= n - 1 and puzzle[i + z + 1][j] != '#' and flag2 == 0 and solve[i + z + 1][j] > num:
                solve[i + z + 1][j] = num
            elif j - z - 1 >= 0 and puzzle[i][j - z - 1] != '#' and flag3 == 0 and solve[i][j - z - 1] > num:
                solve[i][j - z - 1] = num
            elif j + z + 1 <= m - 1 and puzzle[i][j + z + 1] != '#' and flag4 == 0 and solve[i][j + z + 1] > num:
                solve[i][j + z + 1] = num
            if i - z - 1 >= 0 and puzzle[i - z - 1][j] == '#' and flag1 == 0:
                flag1 += 1
            elif i + z + 1 <= n - 1 and puzzle[i + z + 1][j] == '#' and flag2 == 0:
                flag2 += 1
            elif j - z - 1 >= 0 and puzzle[i][j - z - 1] == '#' and flag3 == 0:
                flag3 += 1
            elif j + z + 1 <= m - 1 and puzzle[i][j + z + 1] == '#' and flag4 == 0:
                flag4 += 1

        flag1 = flag2 = flag3 = flag4 = 0
    num += 1
    if num > n*m:
        print(-1)
        break
if num <= n*m:
    print(solve[x_1][y_1])
 	 				  	 	 	 	    	 		 	 			