Problem Statement 
 A rider is a fantasy chess piece that can jump like a knight several times in a single move. (See notes for a description of how a knight jumps.) A rider that can perform a maximum of K jumps during a single move is denoted as a Krider. For example, a 2rider can jump once or twice during a single move, and a 1rider is a traditional knight.
There are some riders of different types on a chessboard. You are given a String[] board representing the layout of the pieces. The jth character of the ith element of board is the content of the square at row i, column j. If the character is a digit K between '1' and '9', the square contains a Krider. Otherwise, if the character is a '.', the square is empty. Return the minimal total number of moves necessary to move all the riders to the same square. Only one piece can move during each move. Multiple riders can share the same squares at all times during the process. Return 1 if it is impossible. 

Definition 
 Class:  CollectingRiders  Method:  minimalMoves  Parameters:  String[]  Returns:  int  Method signature:  int minimalMoves(String[] board)  (be sure your method is public) 




Notes 
  A traditional knight has up to 8 moves from a square with coordinates (x,y) to squares (x+1,y+2), (x+1,y2), (x+2,y+1), (x+2,y1), (x1,y+2), (x1,y2), (x2,y+1), (x2,y1), and can not move outside the chessboard. 

Constraints 
  board will contain between 1 and 10 elements, inclusive. 
  Each element of board will contain between 1 and 10 characters, inclusive. 
  All elements of board will have the same length. 
  board will contain only positive digits ('1''9') and '.' characters. 
  board will contain at least one digit. 

Examples 
0)  
  Returns: 2  The 2rider can jump from (2,0) to (0,1) in the first move, and then from (0,1) to (2,2) to (0,3) in the second. 


1)  
 {"........",
".1......",
"........",
"....3...",
"........",
"........",
".7......",
"........"} 
 Returns: 2  In 2 moves, we can move all the pieces to the cell initially occupied by the 1rider. 


2)  
 
3)  
 
4)  
 {"9133632343",
"5286698232",
"8329333369",
"5425579782",
"4465864375",
"8192124686",
"3191624314",
"5198496853",
"1638163997",
"6457337215"} 
 Returns: 121  
