input.txt 65 B

1234567
  1. 5
  2. 0 2 7 -1 -1
  3. -1 0 3 8 5
  4. -1 2 0 1 -1
  5. -1 -1 -1 0 4
  6. -1 -1 -1 5 0
  7. 0