find the permutation relating {a,b,c,d,e,f,g} with {a,b,g,e,f,c,d}