Enter a grid index less than or equal to 3 (0 to end): 3
Should the grid be printed (Y or N): Y
Grid 3
  13  18  23  25  22  16   5
  18  24  29  31  28  17  11
  19  25  31  32  30  18  15
  17  22  28  29  27  17  20
   9  16  22  25  21  19  22
  12  13  17  22  19  24  23
   9  11  15  19  22  25  22
   8   9  12  19  23  27  22
   7   9  13  21  26  30  21
   6   8  16  24  29  33  26
   5   7  14  21  25  29  25
   4   9  12  18  23  26  22
   3   8  10  15  20  23  19
   2   7   9  12  17  21  16
   1   5   7   9  14  18  15
Grid has 15 rows and 7 columns
Neighbors of (0,2): (0,1) (1,2) (0,3)
Neighbors of (3,6): (2,6) (3,5) (4,6)
Neighbors of (14,0): (13,0) (14,1)
Neighbors of (12,6): (11,6) (12,5) (13,6)
Valid path
Downward 9
Upward 31
