
A friend of yours is doing research on the Traveling Knight Problem (TKP), where you are to find the shortest closed tour of knight moves that visits each square of a given set of squares on a chessboard exactly once. He believes that the most difficult part of the problem is determining the smallest number of knight moves between two given squares, and that once you have accomplished this, finding the tour would be easy.
Of course, you know that it is actually the other way around. So you offer to write a program that solves the "difficult" part.
Your job is to write a program that takes as input the coordinates of two squares and , and then determines the minimal number of knight moves on a shortest route from to .
The input file will contain one or more test cases. Each test case is a single line containing the coordinates of two squares, separated by a single space. The coordinates of a square are two characters, the first is a letter (-) representing the column, and the second is a digit (-) representing the row on the chessboard.
For each test case, print one line as follows: "To get from xx to yy takes n knight moves."
Example 1