Your program should compute the number of moves it takes a chess knight to reach each square of the chess board. The input will be two space-separated integers representing coordinates of the starting square (horizontal then vertical coordinate, 0-7 inclusive each). Your program should output a number grid containing the minimum number of moves a chess knight needs to make to reach each square.
examples
input
0 0
output
03232345
34123434
21432345
32323434
23234345
34343454
43434545
54545456
input
3 1
output
21232123
32303232
21232123
34121432
23232323
32323234
43434343
34343434
Shortest code wins.