gap> M := [["red", "blue"],["blue", "red"]];; gap> RenameRelations(M); [ [ 0, 1 ], [ 1, 0 ] ] gap> M := [[5, 3, 1], [1, 5, 3], [3, 1, 5]];; gap> RenameRelations(M); [ [ 0, 2, 1 ], [ 1, 0, 2 ], [ 2, 1, 0 ] ]