Generate GeneralizedModularyMatrix according to its group