##  ##                   ##    ##                
##  ##                   ###   ###               
######                   ############            
##  ##                   ###############         
                        ############### ##       
##  ##                  ### ############  #      
##  ##                  #   ############  ###    
##  ##                ############  ###### ###   
 #####                ############  ##########   
                     #############  #######  #   
 ####                ######################  ### 
##                 ############   #########  ### 
##  ##             ## ########   ##########   ## 
##  ##             ##### ###   ############## ## 
 ####                ######   ############### ## 
                              ############### ###
 ####                       ################# ###
  ##                        ################# ###
  ##                       ################## ###
  ##                        ################# ## 
 ####

           ####    ####   ##    ##  #####    ####      ####   ######
          ##  ##  ##  ##  ###  ###  ##  ##  ##  ##    ##  ##     ## 
          ##      ##  ##  ## ## ##  ##  ##  ##  ##        ##    ##  
          ##  ##  ##  ##  ##    ##  #####   ##  ##      ##       ## 
           ####    ####   ##    ##  ##       ####     ######  ###   
           
           
The Knight's Tour.

On a normal 8x8 chessboard, find a complete Knight's Tour.

A Knight's move is as in chess, an L shaped move, 
2 squares in one direction and 1 square in the other direction.

The Knight's Tour is one where the knight passes through each square exactly once.

Your program must find any one of possible routes and output it to stdout.

The Knight may start on any square you wish.

The route must be outputed as the sequences of bytes:
X1, Y1, X2, Y2, ... X63, Y63, X64, Y64,
where Xi,Yi are Knight's coordinates in chessboard on i move (0<=Xi<=7, 0<=Yi<=7).

To avoid problems with checking, your program must not work longer than 10 minutes.


The example of solution:

    0  1  2  3  4  5  6  7 
  +--+--+--+--+--+--+--+--+
0 | 1|10|31|64|33|26|53|62|
  +--+--+--+--+--+--+--+--+
1 |12| 7|28|25|30|63|34|51|
  +--+--+--+--+--+--+--+--+
2 | 9| 2|11|32|27|52|61|54|
  +--+--+--+--+--+--+--+--+
3 | 6|13| 8|29|24|35|50|41|
  +--+--+--+--+--+--+--+--+
4 | 3|18| 5|36|49|40|55|60|
  +--+--+--+--+--+--+--+--+
5 |14|21|16|23|46|57|42|39|
  +--+--+--+--+--+--+--+--+
6 |17| 4|19|48|37|44|59|56|
  +--+--+--+--+--+--+--+--+
7 |20|15|22|45|58|47|38|43|
  +--+--+--+--+--+--+--+--+


The route for this solution:

 00000000:  00 00 01 02-00 04 01 06-02 04 00 03-01 01 02 03                    
 00000010:  00 02 01 00-02 02 00 01-01 03 00 05-01 07 02 05                    
 00000020:  00 06 01 04-02 06 00 07-01 05 02 07-03 05 04 03                    
 00000030:  03 01 05 00-04 02 02 01-03 03 04 01-02 00 03 02                    
 00000040:  04 00 06 01-05 03 03 04-04 06 06 07-07 05 05 04                    
 00000050:  07 03 06 05-07 07 05 06-03 07 04 05-05 07 03 06                    
 00000060:  04 04 06 03-07 01 05 02-06 00 07 02-06 04 07 06                    
 00000070:  05 05 04 07-06 06 07 04-06 02 07 00-05 01 03 00                    


P.S. Don't try to defraud the test suite.
Your program must not simply output the ready solution.
Otherwise it can't be accepted.


Submit your entry to: cdvolko@gmx.net

You can send new versions any time.