with(linalg): with(plots): read(`c:/maplev4/share/games/rainbow/rainbow.txt`): A:=matrix([[1,2,3,4,5,6,7,8], [2,3,4,5,6,7,8,1],[3,4,5,6,7,8,1,2], [4,5,6,7,8,1,2,3]]); rb(1,A); rb([r1,f1,r1^(-1),f1],A); #This produces the masterball positions corresponding to A and #obtained from A by moving it by the ``word'' r1f1r1^(-1)f1 - which #means r1 acts on the masterball then f1 then r1^(-1) (the inverse #operation to r1) then f1