initial odd matrix 999 0 999 1 999 2 999 3 20 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 4 4 999 5 999 6 999 7 999 0 5 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 3 4 999 5 30 6 999 7 10 0 999 1 3 2 999 3 999 4 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 999 0 999 1 999 2 999 3 40 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Process column 0 odd matrix 999 0 999 1 999 2 999 3 20 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 4 4 999 5 999 6 999 7 999 0 5 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 3 4 999 5 30 6 999 7 10 0 999 1 3 2 999 3 999 4 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 999 0 999 1 999 2 999 3 40 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 even matrix 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 30 0 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Process column 1 odd matrix 999 0 999 1 999 2 999 3 20 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 4 4 999 5 999 6 999 7 999 0 5 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 3 4 999 5 30 6 999 7 10 0 999 1 3 2 999 3 999 4 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 999 0 999 1 999 2 999 3 40 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 even matrix 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 9 1 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 30 0 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Process column 2 odd matrix 999 0 999 1 999 2 999 3 20 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 4 4 999 5 999 6 999 7 999 0 5 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 3 4 999 5 30 6 999 7 10 0 999 1 3 2 999 3 12 2 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 999 0 999 1 999 2 999 3 40 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 even matrix 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 9 1 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 8 2 999 2 999 3 30 0 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Process column 3 odd matrix 999 0 999 1 999 2 999 3 20 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 4 4 999 5 999 6 999 7 999 0 5 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 3 4 999 5 30 6 999 7 10 0 999 1 3 2 999 3 12 2 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 999 0 999 1 999 2 999 3 40 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 even matrix 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 9 1 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 8 2 999 2 999 3 30 0 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Process column 4 odd matrix 42 4 28 4 35 4 999 3 20 4 82 4 999 6 47 4 26 4 12 4 19 4 999 3 4 4 66 4 999 6 31 4 19 1 5 1 12 1 999 3 21 1 59 1 999 6 24 1 25 4 11 4 18 4 999 3 3 4 65 4 30 6 30 4 10 0 20 2 3 2 999 3 12 2 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 62 4 48 4 55 4 999 3 40 4 102 4 999 6 67 4 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 even matrix 30 4 40 4 23 4 999 3 32 4 70 4 999 6 35 4 14 4 24 4 7 4 999 3 16 4 54 4 999 6 19 4 31 1 17 1 24 1 999 3 9 1 71 1 999 6 36 1 13 4 23 4 6 4 999 3 15 4 53 4 999 6 18 4 22 2 8 2 15 2 999 3 24 2 62 2 999 6 27 2 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 50 4 60 4 43 4 999 3 52 4 90 4 999 6 55 4 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Process column 5 odd matrix 42 4 28 4 35 4 999 3 20 4 82 4 999 6 47 4 26 4 12 4 19 4 999 3 4 4 66 4 999 6 31 4 19 1 5 1 12 1 999 3 21 1 59 1 999 6 24 1 25 4 11 4 18 4 999 3 3 4 65 4 30 6 30 4 10 0 20 2 3 2 999 3 12 2 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 62 4 48 4 55 4 999 3 40 4 102 4 999 6 67 4 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 even matrix 30 4 40 4 23 4 999 3 32 4 70 4 999 6 35 4 14 4 24 4 7 4 999 3 16 4 54 4 999 6 19 4 31 1 17 1 24 1 999 3 9 1 71 1 999 6 36 1 13 4 23 4 6 4 999 3 15 4 53 4 999 6 18 4 22 2 8 2 15 2 999 3 24 2 62 2 999 6 27 2 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 50 4 60 4 43 4 999 3 52 4 90 4 999 6 55 4 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Process column 6 odd matrix 42 4 28 4 35 4 999 3 20 4 82 4 999 6 47 4 26 4 12 4 19 4 999 3 4 4 66 4 999 6 31 4 19 1 5 1 12 1 999 3 21 1 59 1 999 6 24 1 25 4 11 4 18 4 999 3 3 4 65 4 30 6 30 4 10 0 20 2 3 2 999 3 12 2 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 62 4 48 4 55 4 999 3 40 4 102 4 999 6 67 4 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 even matrix 30 4 40 4 23 4 999 3 32 4 70 4 999 6 35 4 14 4 24 4 7 4 999 3 16 4 54 4 999 6 19 4 31 1 17 1 24 1 999 3 9 1 71 1 999 6 36 1 13 4 23 4 6 4 999 3 15 4 53 4 999 6 18 4 22 2 8 2 15 2 999 3 24 2 62 2 999 6 27 2 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 50 4 60 4 43 4 999 3 52 4 90 4 999 6 55 4 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Process column 7 odd matrix 42 4 28 4 35 4 999 3 20 4 82 4 999 6 47 4 26 4 12 4 19 4 999 3 4 4 66 4 999 6 31 4 19 1 5 1 12 1 999 3 21 1 59 1 999 6 24 1 25 4 11 4 18 4 999 3 3 4 65 4 30 6 30 4 10 0 20 2 3 2 999 3 12 2 50 5 999 6 15 7 999 0 999 1 999 2 999 3 999 4 999 5 999 6 60 7 62 4 48 4 55 4 999 3 40 4 102 4 999 6 67 4 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 even matrix 30 4 40 4 23 4 999 3 32 4 70 4 999 6 35 4 14 4 24 4 7 4 999 3 16 4 54 4 999 6 19 4 31 1 17 1 24 1 999 3 9 1 71 1 999 6 36 1 13 4 23 4 6 4 999 3 15 4 53 4 999 6 18 4 22 2 8 2 15 2 999 3 24 2 62 2 999 6 27 2 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 50 4 60 4 43 4 999 3 52 4 90 4 999 6 55 4 999 0 999 1 999 2 999 3 999 4 999 5 999 6 999 7 ------------------------------- Outputting odd paths Distance 42 for odd path 0 4 2 1 4 0 Distance 28 for odd path 0 4 2 1 Distance 35 for odd path 0 4 2 1 4 2 No odd path from 0 to 3 Distance 20 for odd path 0 4 Distance 82 for odd path 0 4 2 1 4 5 No odd path from 0 to 6 Distance 47 for odd path 0 4 2 1 4 7 Distance 26 for odd path 1 4 2 1 4 0 Distance 12 for odd path 1 4 2 1 Distance 19 for odd path 1 4 2 1 4 2 No odd path from 1 to 3 Distance 4 for odd path 1 4 Distance 66 for odd path 1 4 2 1 4 5 No odd path from 1 to 6 Distance 31 for odd path 1 4 2 1 4 7 Distance 19 for odd path 2 1 4 0 Distance 5 for odd path 2 1 Distance 12 for odd path 2 1 4 2 No odd path from 2 to 3 Distance 21 for odd path 2 1 4 2 1 4 Distance 59 for odd path 2 1 4 5 No odd path from 2 to 6 Distance 24 for odd path 2 1 4 7 Distance 25 for odd path 3 4 2 1 4 0 Distance 11 for odd path 3 4 2 1 Distance 18 for odd path 3 4 2 1 4 2 No odd path from 3 to 3 Distance 3 for odd path 3 4 Distance 65 for odd path 3 4 2 1 4 5 Distance 30 for odd path 3 6 Distance 30 for odd path 3 4 2 1 4 7 Distance 10 for odd path 4 0 Distance 20 for odd path 4 2 1 4 2 1 Distance 3 for odd path 4 2 No odd path from 4 to 3 Distance 12 for odd path 4 2 1 4 Distance 50 for odd path 4 5 No odd path from 4 to 6 Distance 15 for odd path 4 7 No odd path from 5 to 0 No odd path from 5 to 1 No odd path from 5 to 2 No odd path from 5 to 3 No odd path from 5 to 4 No odd path from 5 to 5 No odd path from 5 to 6 Distance 60 for odd path 5 7 Distance 62 for odd path 6 4 2 1 4 0 Distance 48 for odd path 6 4 2 1 Distance 55 for odd path 6 4 2 1 4 2 No odd path from 6 to 3 Distance 40 for odd path 6 4 Distance 102 for odd path 6 4 2 1 4 5 No odd path from 6 to 6 Distance 67 for odd path 6 4 2 1 4 7 No odd path from 7 to 0 No odd path from 7 to 1 No odd path from 7 to 2 No odd path from 7 to 3 No odd path from 7 to 4 No odd path from 7 to 5 No odd path from 7 to 6 No odd path from 7 to 7 Outputting even paths Distance 30 for even path 0 4 0 Distance 40 for even path 0 4 2 1 4 2 1 Distance 23 for even path 0 4 2 No even path from 0 to 3 Distance 32 for even path 0 4 2 1 4 Distance 70 for even path 0 4 5 No even path from 0 to 6 Distance 35 for even path 0 4 7 Distance 14 for even path 1 4 0 Distance 24 for even path 1 4 2 1 4 2 1 Distance 7 for even path 1 4 2 No even path from 1 to 3 Distance 16 for even path 1 4 2 1 4 Distance 54 for even path 1 4 5 No even path from 1 to 6 Distance 19 for even path 1 4 7 Distance 31 for even path 2 1 4 2 1 4 0 Distance 17 for even path 2 1 4 2 1 Distance 24 for even path 2 1 4 2 1 4 2 No even path from 2 to 3 Distance 9 for even path 2 1 4 Distance 71 for even path 2 1 4 2 1 4 5 No even path from 2 to 6 Distance 36 for even path 2 1 4 2 1 4 7 Distance 13 for even path 3 4 0 Distance 23 for even path 3 4 2 1 4 2 1 Distance 6 for even path 3 4 2 No even path from 3 to 3 Distance 15 for even path 3 4 2 1 4 Distance 53 for even path 3 4 5 No even path from 3 to 6 Distance 18 for even path 3 4 7 Distance 22 for even path 4 2 1 4 0 Distance 8 for even path 4 2 1 Distance 15 for even path 4 2 1 4 2 No even path from 4 to 3 Distance 24 for even path 4 2 1 4 2 1 4 Distance 62 for even path 4 2 1 4 5 No even path from 4 to 6 Distance 27 for even path 4 2 1 4 7 No even path from 5 to 0 No even path from 5 to 1 No even path from 5 to 2 No even path from 5 to 3 No even path from 5 to 4 No even path from 5 to 5 No even path from 5 to 6 No even path from 5 to 7 Distance 50 for even path 6 4 0 Distance 60 for even path 6 4 2 1 4 2 1 Distance 43 for even path 6 4 2 No even path from 6 to 3 Distance 52 for even path 6 4 2 1 4 Distance 90 for even path 6 4 5 No even path from 6 to 6 Distance 55 for even path 6 4 7 No even path from 7 to 0 No even path from 7 to 1 No even path from 7 to 2 No even path from 7 to 3 No even path from 7 to 4 No even path from 7 to 5 No even path from 7 to 6 No even path from 7 to 7