A friend of yours is conducting research on the Traveling Knight Problem (TKP), where the task is 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 thinks 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 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 two squares and as input, and then determines the number of knight moves on a shortest route from to .
Each test case consists of one line containing two squares separated by one space. A square is a string consisting of a letter (–) representing the column and a digit (–) representing the row on the chessboard.
For each test case, print one line in the format: To get from xx to yy takes n knight moves., where and are the input squares and is the minimum number of knight moves needed.
Example 1