Actually, I see a pattern in the matrix.

Filling in some 0:s makes it easier to see:

000 023 012 089 456 123 046 732 345 123
023 000 046 234 123 046 089 234 567 090
012 046 000 767 456 046 234 123 732 035
089 234 767 000 732 032 048 067 098 100
456 123 456 732 000 234 046 089 089 732
123 046 046 032 234 000 123 046 123 234
046 089 234 048 046 123 000 046 089 019
732 234 123 067 089 046 046 000 123 732
345 567 732 098 089 123 089 123 000 078
123 090 035 100 732 234 019 732 078 000

The positions (row,column) and (column,row) has the same value, and when row = column, the value is 0.

So position 3,2 has the same value as position 2,3, and position 1,1, 2,2, 3,3 etc is 0.

Use this information to alter swordfish's program to suit your needs. Its good practice...