uva439測資A

Input:
e2 e4
a1 b2
b2 c3
a1 h8
a1 h7
h8 a1
b1 c3
f6 f6
g3 g2
a4 b4
b5 c8
a7 h1
a7 h3
e5 b1
b6 d2
e3 e7
b3 f8
f8 b3
c4 c7
d1 e1
Output:
To get from e2 to e4 takes 2 knight moves.
To get from a1 to b2 takes 4 knight moves.
To get from b2 to c3 takes 2 knight moves.
To get from a1 to h8 takes 6 knight moves.
To get from a1 to h7 takes 5 knight moves.
To get from h8 to a1 takes 6 knight moves.
To get from b1 to c3 takes 1 knight moves.
To get from f6 to f6 takes 0 knight moves.
To get from g3 to g2 takes 3 knight moves.
To get from a4 to b4 takes 3 knight moves.
To get from b5 to c8 takes 2 knight moves.
To get from a7 to h1 takes 5 knight moves.
To get from a7 to h3 takes 5 knight moves.
To get from e5 to b1 takes 3 knight moves.
To get from b6 to d2 takes 2 knight moves.
To get from e3 to e7 takes 2 knight moves.
To get from b3 to f8 takes 3 knight moves.
To get from f8 to b3 takes 3 knight moves.
To get from c4 to c7 takes 3 knight moves.
To get from d1 to e1 takes 3 knight moves.