PATHGAME

2
10
. . . . # # # . . .
# # # . . . . # . . .
1
10
. . . . # # # . . .
# # # . . . . # . . .
1
10
. . . . # # # . . .
# # # . . . . # . . 
1
10
. . . . # # # . . .
# # # . . . . . . . 
1
10
....###...
###.......
1
10
. . . . # # # . . .
# # # . . . . . . .
1
1
#
1
1
.
.
1
1
.
#
1
10
...##..##.
#........#
1
10
...##..##.
#.....#...
1
10
...##...#.
#.....#...
2
10
. . . . # # # . . .
# # # . . . . # . . .
1
10
....###...
###....#...
1
10
....###...
###....#..
1
10
...##..##.
#.........
2
1
.
#
10
...##..##.
#........#
2
1
.
#
10
...##..##.
#.........
1
10
...##..##.
#.......##
1
10
...##..##.
#.....#.##
1
10
...##..###
#........#
1
10
...##..#.#
#........#
1
10
....###.#.
###.....#.
1
10
....###.#.
###.....##
1
10
....###.##
###.....#.
1
10
....###...
###.....#.
1
1
#
#
1
1
#
.
1
2
.#
.#
1
2
..
.#
1
2
..
##
1
3
..#
#.#
1
3
...
#.#
1
10
...##..###
#.........
1
10
#..##..###
#........#
1
20
....................
....................
1
20
....................
....................
5
20
....................
....................
10
...##..###
#.........
10
#..##..###
#........#
2
.#
.#
1
#
.
5
20
....................
....................
10
...##..###
#.........
10
#..##..###
#........#
10
....###.##
###.....#.
1
#
.
5
20
....................
....................
10
...##..###
#.........
10
...##..###
#........#
10
....###.##
###.....#.
1
#
.
5
20
....................
....................
10
...##..###
#.........
10
...##..###
#.........
10
....###.##
###.....#.
1
#
.
5
20
....................
....................
10
...##..###
#.........
10
...##..#..
#........#
10
....#.....
###...###.
1
#
.
5
20
....................
....................
10
...##..###
#.........
10
...##..#..
#........#
10
....#.....
###...###.
1
.
.
2
10
...##..###
#.........
10
...##..#..
#........#
5
20
....................
....................
10
...##..###
#.........
10
...##..###
..........
2
.#
.#
1
#
.
6
2
..
##
3
..#
#.#
2
..
.#
10
...##..##.
#.....#.##
10
....###.##
###.....#.
10
.....##...
..........
5
20
....................
....................
10
...##..###
#.........
10
...##..#..
#........#
2
.#
.#
1
#
.
5
20
....................
....................
10
...##..###
#.........
10
...##..#..
#........#
2
..
.#
1
#
.
4 5 3
*ACCB
AACCB
AACBA
AAAAA
3 5
1 5
3 3
5
20
....................
....................
10
...##..###
#.........
10
#..##..###
#........#
2
..
.#
1
#
.
....###.##
###.......