The input file will consist of a single integer
N (
N > 0) specifying the number of mazes in the file. Following this, on a maze by maze basis will be the number of rows,
r (3 <
r <= 20), a space, then the number of columns,
c (3 <
c <= 20). After this will follow
r lines of
c characters, representing a map of the maze:
XXXXXXXXXXXXXX
X XXX
X XFXXXXX X
XXX XX XX X
X S X
XX XXXXXX X X
X X X X
X X X X X
XXX XX X
XXXXXXXXXXXXXX
X’s mark those locations that are walls and can’t be occupied.
S marks the start location, and
F marks the Knight. Blanks are locations that can be freely traveled.