_names :=  {@ "A5", "A6", "A7", "A8", "A9", "J1", "J2", "M11", "M12", "M22",
"PSL211", "PSL213", "PSL217", "PSL219", "PSL223", "PSL225", "PSL227", "PSL229",
"PSL231", "PSL27", "PSL33", "PSL34", "PSL35", "PSU33", "PSU34", "PSU35",
"PSU42", "PSp44", "SL216", "SL232", "SL28", "Sz8" @};

_maxi := #_names;

_words := [
    \[1,1],
    \[2,2,2],
    \[1,2,1,2,1,2,1,2,1,2],
    \[2,2,2,2],
    \[1,2,2,1,2,2,1,2,2,1,2,2,1,2,2],
    \[1,2,1,2,1,2,1,2,1,2,1,2,1,2],
    \[-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2],
    \[1,2,1,2,2,1,-2,1,2,1,2,2,1,-2,1,2,1,2,2,1,-2],
    \[1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2],
    \[1,2,2,1,2,2,1,2,2,1,2,2],
    \[1,2,1,2,1,2,1,2,1,2,1,2,2,1,2,1,-2,1,-2,1,2,1,2,1,-2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,-2],
    \[1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2],
    \[-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2],
    \[-1,-2,-2,-1,-2,1,2,1,2,2,-1,-2,-2,-1,-2,1,2,1,2,2,-1,-2,-2,-1,-2,1,2,1,2,2],
    \[-1,-2,-1,-2,-1,-2,-2,1,2,2,1,2,1,2,-1,-2,-1,-2,-1,-2,-2,1,2,2,1,2,1,2],
    \[1,2,1,2,2,1,2,1,2,1,-2,1,2,1,2,2,1,2,1,2,1,-2,1,2,1,2,2,1,2,1,2,1,-2],
    \[-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2],
    \[-1,-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,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2],
    \[-1,-2,-2,1,2,2,-1,-2,-2,1,2,2],
    \[1,2,1,2,1,-2,-2,1,2,1,2,1,-2,-2,1,2,1,2,1,-2,-2,1,2,1,2,1,-2,-2],
    \[1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2],
    \[1,2,1,2,1,2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,2,1,2,1,2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2,1,-2],
    \[-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2],
    \[1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2,1,2,2],
    \[1,-2,1,2,2,1,2,2,1,-2,1,2,1,2,2,1,-2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,2,1,2,2,1,2,2],
    [],
    \[1],
    \[2],
    \[1,2],
    \[1,2,1,2],
    \[1,2,2,1,-2,1,2],
    \[1,2,1,-2,1,2,2],
    \[1,2,2],
    \[1,2,2,1,2,2],
    \[1,2,1,2,2,1,-2],
    \[-1,-2,1,2],
    \[-2,1],
    \[2,2],
    \[1,2,1,2,2,1,-2,1,2,1,2,2,1,-2],
    \[1,2,1,2,1,2],
    \[1,2,1,2,2],
    \[1,2,1,2,1,-2],
    \[2,1,-2,1,-2,1],
    \[1,2,1,2,1,2,2,1,2,1,2,1,2,2],
    \[1,2,1,2,1,2,2,1,2,2,1,2,2],
    \[1,2,1,2,1,2,2],
    \[1,2,1,2,1,2,1,-2,1,-2],
    \[1,2,2,1,2,1,2,2,1,2,1,2,1,2,2],
    \[-1,-2,1,2,-1,-2,1,2],
    \[1,2,1,2,1,-2,1,-2,1,2,1,-2],
    \[-1,-2,1,2,-1,-2,1,2,-1,-2,1,2],
    \[1,2,1,2,1,-2,1,2,1,2,1,-2,1,-2],
    \[1,2,1,2,1,-2,1,2,1,-2],
    \[1,2,1,2,1,-2,1,2,1,-2,1,2,1,2,1,-2,1,2,1,-2],
    \[1,2,1,2,1,-2,1,-2],
    \[1,2,1,2,1,-2,1,-2,1,2,1,2,1,-2,1,-2],
    \[1,2,1,2,1,-2,1,-2,1,2,1,2,1,-2,1,-2,1,2,1,2,1,-2,1,-2,1,2,1,2,1,-2,1,-2],
    \[1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,2],
    \[-1,-2,-2,1,2,2],
    \[1,2,2,1,-2,1,2,2,1,-2],
    \[1,2,2,1,-2,1,2,2,1,-2,1,2,2,1,-2,1,2,2,1,-2],
    \[1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,2],
    \[1,2,1,2,1,2,2,1,-2],
    \[1,2,1,2,2,1,2,1,2,2,1,2,1,2,2],
    \[1,2,2,1,-2,1,2,2,1,-2,1,2,2,1,-2],
    \[1,2,2,1,-2],
    \[1,2,1,2,2,1,2,2],
    \[1,2,1,2,2,1,-2,-2,1,2,1,2,2,1,-2,-2],
    \[1,2,1,2,2,1,-2,-2],
    \[1,2,1,2,1,2,1,2,2],
    \[-2,-2,1,-2,1,-2,1,-2,1],
    \[1,-2,1,-2,1,2,1,2,1,2,1,-2,1,2,1,-2,1,-2,1,2,1,2,1,2,1,-2,1,2],
    \[1,2,1,2,1,2,1,-2,1,-2,1,2,1,-2,1,2,1,2,1,2,1,-2,1,-2,1,2,1,-2],
    \[1,2,1,2,1,2,1,2,1,-2,1,-2],
    \[1,-2,1,-2,1,2,1,2,1,2,1,-2,1,2],
    \[1,2,1,2,1,2,1,-2,1,-2,1,2,1,-2],
    \[2,1,2,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,-2,-2,1,2,1,-2,-2],
    \[2,2,1,-2,1,2,2,1,-2,1],
    \[1,2,2,2],
    \[1,2,1,-2,-2],
    \[2,2,1,-2,1],
    \[-2,-2,1],
    \[1,2,1,2,1,-2,1,2,1,2,1,-2,1,2,1,2,1,-2,1,2,1,2,1,-2,1,2,1,2,1,-2,1,2,1,2,1,-2],
    \[2,1,-2,1,-2,1,2,1,-2,1,-2,1,2,1,-2,1,-2,1],
    \[1,2,1,2,1,-2,1,2,1,2,1,-2,1,2,1,2,1,-2],
    \[2,1,2,1,-2,1,-2,1,-2,1],
    \[1,2,1,2,1,2,1,-2,1,-2,1,2,1,2,1,2,1,-2,1,-2],
    \[2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1,-2,1,-2,1,-2,1],
    \[1,-2,1,-2,1,2,1,2,1,2,2],
    \[1,2,1,2,1,-2,1,-2,1,2,2],
    \[1,2,1,2,1,2,2,1,2,2,1,-2],
    \[2,2,1,-2,1,-2,1],
    \[1,2,1,2,2,1,2,1,2,2],
    \[1,2,1,2,2,1,2,1,2,2,1,2],
    \[1,2,1,2,1,2,1,2,1,-2,1,2,1,2,1,2,1,2,1,-2,1,2,1,2,1,2,1,2,1,-2],
    \[-1,-2,1,2,-1,-2,1,2,2,-1,-2,1,2,-1,-2,1,2,2],
    \[1,2,1,2,1,2,1,2,2,1,2,2],
    \[1,2,1,2,1,-2,-2],
    \[-1,-2,1,2,-1,-2,1,2,2],
    \[1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,2,1,2,1,2,2,1,2,2],
    \[1,2,1,2,1,2,2,1,2,2],
    \[1,2,1,2,1,2,2,1,-2,1,2,1,2,1,2,2,1,-2],
    \[1,2,2,1,2,2,1,2,2],
    \[1,2,1,2,1,2,1,2,1,2,1,2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1,2],
    \[2,2,1,-2,1,2],
    \[2,1,-2,1,2,2],
    \[2,1,2,1,2,2,1,2,2],
    \[2,2,1,2,2,1,2,1,2],
    \[2,1,2,1,2,2],
    \[2,1,2,1],
    \[2,1,-2],
    \[1,2,2,1,2,2,1],
    \[1,2,2,1],
    \[-1,-2,-1,2,1,2,1,2,1],
    \[2,1,2,1,2],
    \[1,2,1,2,1,2,2,1,2],
    \[1,-2,1,-2,1,2,1,2,1,-2],
    \[1,2,1,2,2,1,2,1,-2,1,-2,1,2,1],
    \[2,1,-2,1,2,2,1],
    \[2,1,2,1,2,2,1,2,1,2,2,1,2,1,2],
    \[1,2,1,2,2,1,2,1,2,1,-2],
    \[2,-1,2,-1,-2,-1,2,1,2,1,-2,1,-2],
    \[-2,-1,2,1,2],
    \[1,-2,1,2,1,-2,1,2,1,-2,1,2,1,2,1,-2,1,-2,1,2,1,2,1,-2,1,-2],
    \[2,-1,-2,-1,2,1,2,1,-2],
    \[-1,2,-1,-2,1,2,1,-2,1],
    \[-1,2,-1,-2,-1,-2,1,2,1,2,1,-2,1],
    \[2,1,-2,1,2,1,-2,1,-2,1,2],
    \[2,1,2,1,-2,1,2,1,-2,1,2,1,2,1,-2,1,2],
    \[-1,-2,-1,-2,1,2,1,2,1],
    \[2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,2,-1,-2,1,-2,-1,2,1,-2,-1,2,1,2],
    \[2,1,-2,-1,-2,1,2,-1,-2,1,2],
    \[-2,-2,1,2,2,1,-2,-2,1,2,2,1,2,1,2],
    \[-1,2,1,-2,1],
    \[-2,-2,-1,2,-1,2,2,1,-2,1,2,2],
    \[2,2,1,-2,1,2,2,1,-2,-2,1,2,2],
    \[2,2,1,-2,-2,1,2,2,1,-2,-2,1,-2,-2,1,2,2],
    \[2,2,1,-2,1,-2,1,2,2,1,2,2],
    \[2,1,-2,-2],
    \[2,2,1,-2,1,-2,-2,1,2,2,1,2],
    \[2,2,1,2,2,1,-2,1,2,2,1,-2,-2],
    \[-2,-1,-2,-1,2,1,2,1,2],
    \[2,-1,2,1,-2],
    \[1,2,1],
    \[1,-2,1,-2,1,2,1,2,1,2,1,-2,1,2,1,2,1,2,1,2],
    \[2,1,2,1,2,1,2,1,-2,1,2,1,2,1,2,1,-2,1,-2,1],
    \[2,1,2,1,-2,1,-2,1,2],
    \[2,1,-2,1,-2,1,2,1,2],
    \[1,-2,1,2,1,2],
    \[-1,2,-1,2,1,-2,1],
    \[-2,-1,2,1,-2,1,2],
    \[-1,-2,-1,2,1,2,1],
    \[2,-1,-2,1,2,1,-2],
    \[2,-1,-2,-1,2,1,2,1,2,1,-2],
    \[2,1,-2,1,2,1,2,1,2,1,2,1,-2,1,-2,1],
    \[1,2,1,-2,1,-2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1,-2],
    \[2,1,-2,1,2,1,2,1,-2,1,2,1,-2],
    \[-2,-1,-2,-2,-1,2,1,2,2,1,2],
    \[2,2,1,2,1,2],
    \[2,1,-2,1,2,2,1,2],
    \[2,1,2,2,1,-2,1,2],
    \[-1,2,-1,2,2,1,-2,1],
    \[2,-1,-2,-1,2,1,2,1,2,2,1,2,1,-2],
    \[2,1,2,2,1,2,1,2],
    \[2,1,-2,1,-2,1,2,1,2,1,2],
    \[2,1,2,1,2,1,-2,1,2,1,-2],
    \[-2,-1,-2,1,2,1,2],
    \[2,1,2,1,2,1,2,1,-2,1,-2,1,-2],
    \[2,1,-2,-1,-2,1,2,1,2],
    \[1,2,1,2,1,-2,1,2,1,2,1,2,1,-2],
    \[-2,-1,-2,-1,2,-1,-2,1,2,1,-2,1,2,1,2],
    \[2,1,2,1,2,1,2,1,-2,1,2,1,2,1,-2],
    \[1,1,2,1,2,1,2,1,-2,1,2,1,2,1,2,1,-2],
    \[2,1,2,1,2,1,2,1,-2,1,2,1,2],
    \[2,1,2,1,-2,1,2,1,2,1,2,1,2],
    \[2,1,2,1,-2,1,2,1,2],
    \[-2,1,2,1,-2,1,-2,1,2,1,2,1,2,1,2],
    \[1,2,1,2,1,-2,1,2,1,2,1,-2,1,2],
    \[1,2,1,-2,1,2,1,2,1,-2,1,2,1,2],
    \[-2,-1,-2,-1,-2,1,2,1,2,1,2],
    \[-1,-2,-1,2,-1,2,1,2,1,-2,1,2,1],
    \[-2,-1,-2,-1,2,-1,2,1,-2,1,2,1,2],
    \[1,-2,1,2,1,-2,1,-2,1,2,1,2,1,2],
    \[2,1,2,1,2,1,2,1,2,1],
    \[1,2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1],
    \[2,1,2,1,-2,1,2,1,-2,1,-2,1,2],
    \[2,1,2,1,2,1,-2,1,2,1,2,1,2,1,-2,1],
    \[2,1,2,1,-2,1,2,1,-2,1,2,1,-2,1,-2],
    \[2,-1,2,-1,2,1,-2,1,-2],
    \[-2,1,-2,1,2,1,2,1,2,1,2,1,-2,1,2,1,2,1,2,1,2],
    \[-2,-2,-1,-2,1,2,1,2,2,1,2],
    \[2,1,-2,-2,-1,2,1,-2,1,2,2],
    \[2,1,2,1,-2,1,2],
    \[1,2,1,-2,1,2,1],
    \[2,1,2,1,-2,1,2,1,2,2,1,2,2],
    \[2,2,1,2,2,1,2,1,-2,1,2,1,2],
    \[2,1,2,2,1,-2,1,2,1,2],
    \[-2,-1,2,1,2,1,2],
    \[2,-1,2,1,2,1,-2],
    \[-2,1,2,1,2,1,2,1,2],
    \[2,1,2,1,2,1,2,1,-2,1,-2,1,-2,1,2,1,2],
    \[2,1,2,1,2,1,2,-1,-2,-1,-2,1,2,1,2,1],
    \[1,2,1,-2,1,2,1,-2],
    \[1,2,1,2,1,2,2,2,2],
    \[2,2,1,2,1],
    \[1,2,2,1,-2,-2],
    \[2,2,2,1,2,1,2],
    \[1,2,1,-2],
    \[1,2,1,-2,1,-2,1,2,1,-2,1,-2,1,-2,1,2,1],
    \[2,1,-2,1,2,1,-2,1,-2,1,2,1,2],
    \[-1,-2,-1,2,-1,2,1,-2,1,2,1],
    \[2,1,2,1,2,1,2,1,-2,1,2,2],
    \[2,1,2,1,2,1,2,2,1,2,2],
    \[1,-2,1,2,1,2,1,2,1,-2],
    \[-2,1,2,1,2,1,2,1,-2,1],
    \[2,1,2,2,1,2,2,1,2],
    \[2,2,1,2,2,1,2,1,2,2,1,2,1,2],
    \[1,2,1,2,1],
    \[2,1,2,2,1,2,1,2,2],
    \[1,2,1,2,1,2,1,-2,1,2],
    \[1,2,1,2,1,2,1,2,1,2,1,2,2,1,2,2],
    \[1,2,1,2,1,-2,-2,1,2,1,2,1,-2,-2],
    \[2,1,2,1,2,1,2,2],
    \[1,-2,1,2,1,2,1,2],
    \[2,2,1,2,2,1,2,1,2,1,2,1],
    \[-2,-2,-1,2,2,1],
    \[2,1,2,1,-2,-2,1,2,1,2,1,-2,-2,1],
    \[2,1,2,1,2,1,2,1,-2],
    \[-2,-1,-2,-1,2,1,2,1,2,1,2],
    \[-2,-1,-2,-1,2,1,-2,1,2,1,2],
    \[2,1,-2,1,2,1,2,1,2,1,-2],
    \[2,1,2,1,2,2,1,2,2,1],
    \[1,-2,-2,-1,-2,-1,2,2,1,2,1],
    \[-1,-2,-1,2,2,1,2,1],
    \[-2,-2,-1,2,1,2,2],
    \[-2,-1,2,1,-2,-1,2,1,-2],
    \[-1,-2,1,2,1,2,2],
    \[-2,-2,1,2,2],
    \[2,1,2,2,1,2],
    \[2,1,2,2,1,2,1,2,2,1],
    \[2,-1,2,-1,2,-1,2,2,1,-2,1,-2,1,-2],
    \[1,-2,1,2,1,2,1,2,2,1,2,1,-2,1,2,2,1,2,2],
    \[-2,-1,-2,-1,2,-1,2,-1,-2,-1,2,-1,2,-1,-2,1,2,1,-2,1,-2,1,2,1,-2,1,-2,1,2,1,2],
    \[-1,-2,-1,2,-1,2,-1,-2,-1,2,-1,2,-1,-2,1,2,1,-2,1,-2,1,2,1,-2,1,-2,1,2,1],
    \[2,-1,-2,-1,2,-1,2,-1,-2,-1,2,-1,2,-1,-2,1,2,1,-2,1,-2,1,2,1,-2,1,-2,1,2,1,-2],
    \[1,-2,-2,1,2,1,-2,-2,1,2,1,-2,1,2,1,-2,-2,1,2,1,-2,-2],
    \[2,-1,-2,-1,2,2,1,-2,-2,1,2,1,-2,1],
    \[1,2,2,-1,2,2,-1,2,1,-2,1,-2,-2,1,-2,-2],
    \[2,2,1,-2,-2,1,2,1,2,1,-2,-2,1,2],
    \[1,-2,1,-2,1,2,1,-2,1,-2,1,-2,1,-2,1,2,1,2,1,2,1],
    \[1,2,1,2,1,2,1,-2,1,2,1,-2,1,-2],
    \[2,1,-2,1,2,1,-2,1,-2,1,2,1,2,1,-2,1,2,1,-2],
    \[-1,-2,-1,-2,-1,2,1,2,1,2,1],
    \[2,-1,2,2,1,-2],
    \[2,2,1,2,2,1,2,1,2,2,1,2,1,2,2,1],
    \[2,2,1,2,1,2,1],
    \[2,1,2,2,1,-2,1,2,2,1,-2,1,2,2,1,2,1,2,2,1,2,1,2,2,1,2],
    \[2,1,-2,1,2,1,-2,1,2,1,-2,1,2],
    \[-2,-1,2,-1,2,-1,-2,1,2,1,-2,1,-2,1,2],
    \[1,-2,1,2,1,-2,1,2,1,2,1,-2],
    \[2,1,2,1,2,1,-2,1,-2,1,2,1,2,1,2],
    \[2,1,2,1,2,1,2,1,-2,1,2,1,-2,1,2,1,-2,1,2,1,2,1,2,1,2],
    \[1,2,1,2,1,2,1,2,1],
    \[1,2,1,-2,1,2,1,2,1,2,1,-2,1,2],
    \[2,-1,-2,-1,-2,-2,1,2,2,1,2,1,-2],
    \[-1,-2,-1,-2,-2,-1,-2,1,2,1,2,2,1,2,1],
    \[1,2,1,2,1,-2,1,2,1,2,1],
    \[2,-1,-2,1,2,-1,-2,1,2,2,1],
    \[1,2,2,-1,-2,1,2,-1,-2,1,2],
    \[2,-1,-2,-1,-2,1,2,1,2,1,-2],
    \[2,1,-2,-2,1,2],
    \[1,2,1,2,2,2,1,-2],
    \[2,1,-2,1,-2,1,2,1,2,1,2,1],
    \[2,1,2,1,2,1,-2,1,2,1,2,1,-2,1,2,1,2,1,-2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1,2,1,-2,1,-2],
    \[2,1,2,1,2,1,2,1,-2,1,-2,1,-2,1,2,1,2,1,2,1],
    \[-1,-2,-1,-2,-1,-2,-1,2,-1,-2,1,2,1,-2,1,2,1,2,1,2,1],
    \[-1,-2,1,2,-1,-2,1,2,1,2,1,2,1,2,-1,2,1,-2,-1,2,1,-2,1,-2],
    \[2,-1,2,1,-2,1,-2],
    \[1,2,1,2,1,2,1,-2,1,-2,1,-2,1,-2],
    \[2,2,1,2,1,-2,1,2,1,2,2,1,2,1,-2,1,-2],
    \[1,-2,1,2,1,2,2,1,2,1,-2,1,2,1,-2]
];

_relators := [
    \[1,2,3],
    \[1,4,3,5],
    \[1,4,6,7,8],
    \[1,4,9,10,11],
    \[1,4,12,13,14,15,16],
    \[1,2,6,17,18],
    \[1,19,20,7,21,22,23],
    \[1,4,24,25,26],
    \[1,2,27,28,29],
    \[1,4,24,25,30,31,32,33],
    \[1,2,24,34],
    \[1,2,35,36],
    \[1,2,37,38],
    \[1,2,39,40],
    \[1,2,24,41],
    \[1,2,35,42],
    \[1,2,35,34],
    \[1,2,9,36],
    \[1,2,9,43],
    \[1,2,6,13],
    \[1,2,35,44],
    \[1,4,6,5,45,46],
    \[1,2,47,28,48,49,50],
    \[1,51,6,52,53],
    \[1,2,35,54],
    \[1,4,27,55,56,57],
    \[1,4,12,7,58],
    \[1,19,9,7,59,60,61],
    \[1,2,9,38],
    \[1,2,62,63],
    \[1,2,12,42],
    \[1,4,3,64,65,66]
];

_repsf := [
    \[67,68,69,70,71],
    \[67,68,72,73,69,74,70],
    \[67,68,75,76,69,77,74,70,78],
    \[67,68,79,3,80,77,69,81,82,76,83,84,70,78],
    \[67,68,79,10,81,85,77,69,86,75,87,88,70,82,89,74,83,84],
    \[67,68,69,28,90,91,70,77,92,93,94,95,96,97,98],
    \[67,68,81,99,71,100,90,77,101,102,103,70,74,104,82,105,106,107,108,109,110],
    \[67,68,75,69,73,74,111,112,70,78],
    \[67,3,68,90,69,113,114,71,115,77,116,117,70,83,84],
    \[67,68,75,69,108,77,74,104,118,82,70,78],
    \[67,68,69,77,90,119,70,78],
    \[67,68,69,83,77,90,13,70,71],
    \[67,68,69,96,119,120,77,90,13,70,81],
    \[67,68,69,119,83,77,90,13,96,121,70,78],
    \[67,68,69,77,115,70,81,71,3,122,96,123,83,84],
    \[67,68,69,96,124,125,83,77,7,70,3,122,20,81,71],
    \[67,68,69,126,28,13,90,70,81,122,3,71,20,77,92,7],
    \[67,68,69,20,81,92,77,90,127,128,129,70,71,122,6,96,97],
    \[67,68,69,90,20,81,92,77,70,71,122,6,130,131,132,133,134,135],
    \[67,68,69,77,70,78],
    \[67,68,97,69,77,96,83,84,70,78,3,136],
    \[67,68,137,69,76,73,74,75,70,78],
    \[67,68,69,20,138,91,97,139,77,81,140,96,141,71,142,129,6,143,78,70,83,84,144,145,146,147,148,149,150,151],
    \[67,68,79,77,152,153,154,69,70,78,155,156,157,74],
    \[67,68,69,115,158,146,144,145,77,90,83,84,159,160,70,78,3,136,88,161,162,163],
    \[67,68,75,69,71,164,165,166,74,82,156,87,167,70],
    \[67,79,68,81,140,144,75,69,108,77,153,168,83,84,74,169,70,78,82,156],
    \[67,68,170,100,171,3,172,173,77,90,81,20,69,174,127,108,175,176,32,177,104,71,70,74,75,178,25],
    \[67,68,69,20,81,70,122,71,179,77,13,90,180,28,64,7,92],
    \[67,68,69,144,146,181,182,183,70,71,122,179,9,3,27,24,12,35,20,184,6,185,81,127,186,115,187,188,189,190,191,192,193],
    \[67,68,69,77,90,13,70,71,122],
    \[67,68,69,126,70,77,90,13,74,178,194]
];

_maxf := [
    [
	\[195,196],
	\[197,198],
	\[68,199]
    ],
    [
	\[68,200],
	\[68,201],
	\[195,196],
	\[68,202],
	\[68,203]
    ],
    [
	\[68,204],
	\[195,205],
	\[71,206],
	\[207,198],
	\[208,195,79]
    ],
    [
	\[209,79],
	\[195,196],
	\[196,206],
	\[68,210],
	\[119,75],
	\[211,79]
    ],
    [
	\[196,206],
	\[212,195],
	\[211,195],
	\[213,79],
	\[214,79],
	\[195,196],
	\[215,79],
	\[216,81]
    ],
    [
	\[68,217],
	\[218,219],
	\[220,221],
	\[222,223],
	\[224,225],
	\[68,226],
	\[68,227]
    ],
    [
	\[68,228],
	\[229,200],
	\[81,230],
	\[68,231],
	\[232,81],
	\[233,81],
	\[234,197],
	\[68,235],
	\[236,81]
    ],
    [
	\[68,237],
	\[70,206],
	\[229,238],
	\[239,79],
	\[68,199]
    ],
    [
	\[68,240],
	\[68,241],
	\[242,197],
	\[243,229],
	\[3,244],
	\[245,246],
	\[247,248],
	\[249,3],
	\[90,250],
	\[251,3],
	\[252,3]
    ],
    [
	\[68,253],
	\[68,254],
	\[208,255],
	\[256,208],
	\[257,258],
	\[247,79],
	\[259,197],
	\[68,260]
    ],
    [
	\[68,218],
	\[68,238],
	\[70,261],
	\[68,262]
    ],
    [
	\[68,218],
	\[68,195],
	\[68,261],
	\[68,263]
    ],
    [
	\[68,264],
	\[68,139],
	\[68,265],
	\[68,195],
	\[68,266]
    ],
    [
	\[70,267],
	\[68,218],
	\[68,238],
	\[68,225],
	\[68,195]
    ],
    [
	\[70,268],
	\[68,269],
	\[68,270],
	\[68,262],
	\[68,271]
    ],
    [
	\[68,272],
	\[68,273],
	\[68,274],
	\[68,275],
	\[68,195]
    ],
    [
	\[69,276],
	\[68,195],
	\[68,262],
	\[68,277]
    ],
    [
	\[278,96],
	\[195,279],
	\[69,280],
	\[68,261],
	\[68,281]
    ],
    [
	\[212,70],
	\[68,218],
	\[282,3],
	\[68,283],
	\[68,262]
    ],
    [
	\[196,206],
	\[195,196],
	\[196,218]
    ],
    [
	\[195,196],
	\[196,206],
	\[247,284],
	\[68,285]
    ],
    [
	\[286,196],
	\[287,196],
	\[245,79],
	\[68,199],
	\[68,288],
	\[289,79],
	\[68,290],
	\[68,291],
	\[196,292]
    ],
    [
	\[68,293],
	\[68,294],
	\[295,197],
	\[296,197],
	\[297,298]
    ],
    [
	\[195,299],
	\[195,300],
	\[301,302],
	\[195,303]
    ],
    [
	\[69,304],
	\[68,305],
	\[195,196],
	\[306,220]
    ],
    [
	\[196,206],
	\[195,196],
	\[307,178],
	\[68,308],
	\[195,309],
	\[206,310],
	\[196,311],
	\[68,198]
    ],
    [
	\[68,312],
	\[169,79],
	\[69,313],
	\[75,198],
	\[314,81]
    ],
    [
	\[68,315],
	\[316,317],
	\[318,317],
	\[319,317],
	\[320,321],
	\[172,322],
	\[68,323]
    ],
    [
	\[68,324],
	\[68,237],
	\[68,195],
	\[68,325]
    ],
    [
	\[68,326],
	\[68,275],
	\[68,195]
    ],
    [
	\[68,199],
	\[68,262],
	\[68,195]
    ],
    [
	\[327,218],
	\[195,328],
	\[329,330],
	\[68,206]
    ]
];

_sylf := [[]: i in [1 .. 32]];
_sylf[1][2] := \[68,331];
_sylf[2][2] := \[68,195];
_sylf[2][3] := \[332,199];
_sylf[3][2] := \[333,197];
_sylf[3][3] := \[75,334];
_sylf[4][2] := \[68,333,195];
_sylf[4][3] := \[168,335];
_sylf[5][2] := \[68,195,336];
_sylf[5][3] := \[70,337];
_sylf[6][2] := \[338,339,340];
_sylf[7][2] := \[341,206,81];
_sylf[7][3] := \[342,343];
_sylf[7][5] := \[344,303];
_sylf[8][2] := \[333,196];
_sylf[8][3] := \[90,76];
_sylf[9][2] := \[345,346,347];
_sylf[9][3] := \[348,237];
_sylf[10][2] := \[349,350,351];
_sylf[10][3] := \[352,75];
_sylf[11][2] := \[68,275];
_sylf[12][2] := \[68,353];
_sylf[13][2] := \[68,266];
_sylf[14][2] := \[68,354];
_sylf[15][2] := \[68,195];
_sylf[16][2] := \[68,262];
_sylf[16][5] := \[91,355];
_sylf[17][2] := \[68,275];
_sylf[17][3] := \[196,356,357];
_sylf[18][2] := \[68,353];
_sylf[19][2] := \[68,283];
_sylf[20][2] := \[68,195];
_sylf[21][2] := \[271,358];
_sylf[21][3] := \[97,359];
_sylf[22][2] := \[360,361,330,362];
_sylf[22][3] := \[363,364];
_sylf[23][2] := \[365,20];
_sylf[23][5] := \[97,139];
_sylf[24][2] := \[68,366];
_sylf[24][3] := \[77,367];
_sylf[25][2] := \[368,369,370,371];
_sylf[25][5] := \[372,373];
_sylf[26][2] := \[333,196];
_sylf[26][3] := \[75,374];
_sylf[26][5] := \[375,376];
_sylf[27][2] := \[195,377,378];
_sylf[27][3] := \[379,380];
_sylf[28][2] := \[381,382,383,384];
_sylf[28][3] := \[385,386];
_sylf[28][5] := \[387,388];
_sylf[29][2] := \[389,390,391,221];
_sylf[30][2] := \[392,393,195,394,395];
_sylf[31][2] := \[396,275,397];
_sylf[32][2] := \[398,218,399];

_cycles :=  [
    [
	\[3,2,1,5,4],
	\[4,1,3,2,5]
    ],
    [
	\[1,3,2,5,4,6],
	\[4,1,2,3,6,5]
    ],
    [
	\[5,2,3,4,1,7,6],
	\[2,3,4,1,6,5,7]
    ],
    [
	\[4,7,5,1,3,8,2,6],
	\[1,2,4,3,6,7,8,5]
    ],
    [
	\[2,1,3,4,6,5,7,8,9],
	\[1,3,4,5,2,7,8,9,6]
    ],
    [
	\[55,35,186,253,65,80,7,151,71,202,161,170,37,96,162,124,169,110,22,130,125,19,60,241,167,33,45,245,66,237,248,238,26,103,2,261,13,226,61,122,225,236,69,210,27,198,192,164,106,63,243,78,88,183,1,224,250,244,213,23,39,62,50,216,5,29,67,264,43,98,9,233,191,159,75,155,172,52,211,6,260,165,119,112,201,94,144,53,185,160,121,134,196,86,246,14,249,70,180,100,266,207,34,232,147,49,247,115,174,18,227,84,116,133,108,113,209,223,83,141,91,40,175,16,21,184,150,214,221,20,149,178,114,92,166,256,177,142,154,230,120,138,220,87,218,265,105,240,131,127,8,263,157,139,76,228,153,239,74,90,11,15,205,48,82,135,25,229,17,12,176,77,197,109,123,171,137,132,179,99,234,188,54,126,89,3,187,182,203,208,73,47,200,257,258,93,173,46,242,193,85,10,189,235,163,206,102,190,117,44,79,212,59,128,217,64,215,145,219,143,129,231,118,56,41,38,111,156,168,140,222,104,72,181,204,42,30,32,158,148,24,199,51,58,28,95,107,31,97,57,262,254,4,252,259,136,194,195,255,81,36,251,152,68,146,101],
	\[5,3,6,1,4,2,51,69,89,19,114,91,74,73,140,143,103,142,88,146,149,92,33,9,138,76,125,93,30,70,180,31,145,20,188,196,36,174,197,104,202,50,98,157,183,186,60,177,118,199,71,179,38,132,210,213,155,158,193,154,57,68,240,173,175,66,220,110,90,29,7,13,75,72,14,147,17,82,81,137,257,151,181,96,232,11,12,10,24,8,87,148,141,243,40,225,85,200,255,251,21,15,77,95,41,242,201,129,224,62,128,111,25,86,217,265,172,211,127,229,237,35,152,162,144,16,230,112,130,108,164,189,168,191,219,124,260,113,18,102,28,139,126,27,23,34,26,22,101,185,78,208,131,47,61,39,198,192,258,226,46,136,266,153,121,59,262,190,235,135,109,264,239,53,215,209,212,52,178,32,184,254,194,83,263,161,134,122,54,133,187,58,166,45,249,37,156,44,42,43,245,105,222,163,56,106,55,123,218,207,49,48,205,63,65,116,261,176,170,241,159,236,227,171,84,231,252,195,246,119,160,97,233,234,253,203,165,167,64,214,67,206,256,99,107,120,247,248,228,182,259,223,169,250,244,94,79,221,100,80,115,238,150,117,216,204]
    ],
    [
	\[4,25,3,1,5,97,35,54,9,10,26,12,13,95,36,23,17,18,19,38,37,91,16,100,2,11,27,28,73,89,31,93,99,46,7,15,21,20,58,92,96,94,43,44,72,34,79,55,65,80,51,52,71,8,48,84,75,39,70,66,61,78,85,82,49,60,74,68,98,59,53,45,29,67,57,83,77,62,47,50,87,64,76,56,63,90,81,88,30,86,22,40,32,42,14,41,6,69,33,24],
	\[21,55,56,28,14,99,73,95,79,29,35,71,34,77,47,52,24,69,75,45,42,30,1,43,5,19,41,22,44,32,59,4,91,18,2,6,84,48,26,27,3,81,33,76,36,97,88,96,37,94,50,90,38,67,64,40,83,61,92,93,72,12,25,11,54,70,60,49,89,31,9,57,87,53,78,86,63,39,62,51,23,100,58,85,68,10,46,8,13,82,17,66,65,98,15,74,7,80,20,16]
    ],
    [
	\[10,8,11,4,7,6,5,2,9,1,3],
	\[4,11,3,7,5,1,6,8,2,9,10]
    ],
    [
	\[11,2,5,8,3,6,10,4,9,7,1,12],
	\[9,7,8,5,6,4,11,10,12,3,2,1]
    ],
    [
	\[1,13,18,22,19,11,9,8,7,12,6,10,2,15,14,16,17,3,5,20,21,4],
	\[6,12,16,15,20,5,21,13,9,17,11,19,7,2,4,10,3,22,14,1,8,18]
    ],
    [
	\[2,1,4,3,5,6,8,7,9,11,10],
	\[1,7,2,6,4,5,3,10,8,9,11]
    ],
    [
	\[2,1,4,3,6,5,13,8,10,9,11,14,7,12],
	\[3,1,2,9,4,8,6,7,5,12,10,11,13,14]
    ],
    [
	\[2,1,4,3,6,5,8,7,9,11,10,13,12,15,14,16,18,17],
	\[3,1,2,5,13,7,14,9,10,8,18,11,4,6,16,17,15,12]
    ],
    [
	\[2,1,4,3,6,5,15,9,8,11,10,13,12,20,7,17,16,19,18,14],
	\[3,1,2,10,4,8,6,7,9,5,14,11,13,12,19,15,20,17,16,18]
    ],
    [
	\[2,1,4,3,6,5,15,9,8,11,10,22,14,13,7,17,16,19,18,21,20,12,24,23],
	\[3,1,2,14,4,8,6,7,23,9,13,11,12,5,20,15,19,17,18,16,24,21,10,22]
    ],
    [
	\[6,3,2,5,4,1,8,7,10,9,12,11,14,13,16,15,17,19,18,21,20,23,22,24,26,25],
	\[5,1,21,3,2,19,6,22,8,20,10,18,12,17,14,16,15,13,7,11,4,9,25,23,24,26]
    ],
    [
	\[2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27],
	\[1,20,2,25,4,15,6,14,8,17,10,16,12,9,7,13,11,21,18,3,19,24,22,23,5,28,26,27]
    ],
    [
	\[10,3,2,5,4,7,6,9,8,1,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,29,30],
	\[2,11,28,3,6,26,30,7,29,9,1,19,12,18,14,24,16,15,13,27,20,25,22,17,23,5,21,4,10,8]
    ],
    [
	\[2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17,20,19,22,21,24,23,26,25,28,27,30,29,32,31],
	\[20,21,2,4,1,7,18,9,19,11,16,13,17,25,14,10,12,6,8,5,3,24,22,23,15,31,26,30,28,29,27,32]
    ],
    [
	\[2,1,5,4,3,6,7],
	\[1,4,2,3,7,5,6]
    ],
    [
	\[2,1,4,3,6,5,8,7,9,10,11,12,13],
	\[11,6,5,13,9,12,7,4,3,1,10,2,8]
    ],
    [
	\[21,2,3,4,6,5,9,18,7,12,15,10,17,16,11,14,13,8,19,20,1],
	\[16,9,6,21,14,15,3,8,17,1,12,18,10,5,7,13,20,19,11,2,4]
    ],
    [
	\[1,29,12,4,26,18,10,14,9,7,11,3,27,8,31,23,17,6,24,20,21,28,16,19,30,5,13,22,2,25,15],
	\[23,7,29,17,26,6,9,11,2,5,30,1,16,13,18,14,22,19,15,3,24,4,12,27,28,10,21,31,20,8,25]
    ],
    [
	\[21,2,8,15,5,22,16,3,28,27,20,19,23,14,4,7,26,25,12,11,1,6,13,24,18,17,10,9],
	\[3,5,16,22,23,18,10,4,9,14,7,17,6,12,26,24,11,13,1,25,20,15,21,27,2,28,19,8]
    ],
    [
	\[46,35,24,13,57,6,8,7,10,9,31,47,4,34,39,62,48,27,65,55,30,42,58,3,45,50,18,59,38,21,11,41,53,14,2,56,61,29,15,49,32,22,52,64,25,1,12,17,40,26,60,43,33,63,20,36,5,23,28,51,37,16,54,44,19],
	\[5,1,3,4,2,47,59,16,23,35,20,49,62,8,21,14,58,44,48,42,29,32,26,56,19,9,28,41,15,55,60,54,39,40,38,13,31,10,61,53,27,11,12,51,6,52,45,25,43,24,18,65,34,22,63,50,7,64,57,37,33,36,30,17,46]
    ],
    [
	\[36,38,9,4,49,6,40,43,3,23,46,35,34,33,15,17,16,18,21,20,19,22,10,37,39,42,27,47,29,45,44,32,14,13,12,1,24,2,25,7,48,26,8,31,30,11,28,41,5,50],
	\[3,4,13,12,9,1,14,7,5,8,11,50,6,10,25,27,35,43,16,24,40,34,29,26,45,44,42,39,36,38,31,15,37,17,22,47,49,21,28,30,33,19,18,20,32,48,23,46,41,2]
    ],
    [
	\[1,27,25,22,18,6,12,26,24,21,17,7,13,14,15,19,11,5,16,20,10,4,23,9,3,8,2],
	\[4,2,5,12,21,9,7,27,18,19,10,24,16,25,14,8,17,23,20,11,26,15,6,1,22,3,13]
    ],
    [
	\[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,24,25,22,23,28,29,26,27,32,33,30,31,36,37,34,35,40,41,38,39,44,45,42,43,48,49,46,47,52,53,50,51,56,57,54,55,60,61,58,59,64,65,62,63,68,69,66,67,72,73,70,71,76,77,74,75,80,81,78,79,84,85,82,83],
	\[22,10,42,82,62,26,2,30,34,38,6,54,70,66,14,74,46,78,18,50,58,11,43,85,64,1,23,25,24,12,83,65,44,13,63,45,84,39,7,56,73,27,3,32,37,79,20,52,61,67,17,76,49,81,60,19,51,29,36,5,31,69,48,16,75,41,72,9,55,68,77,47,15,28,33,35,4,40,57,71,8,80,53,59,21]
    ],
    [
	\[2,1,4,3,6,5,8,7,10,9,12,11,14,13,15,17,16],
	\[3,1,2,5,7,6,4,9,15,16,10,14,12,13,8,11,17]
    ],
    [
	\[2,1,16,17,18,19,20,21,22,23,24,25,26,27,28,3,4,5,6,7,8,9,10,11,12,13,14,15,33,32,31,30,29],
	\[3,1,2,14,24,8,33,23,13,5,20,17,31,27,26,15,22,11,29,18,30,12,6,10,21,16,4,19,28,25,9,7,32]
    ],
    [
	\[1,3,2,5,4,7,6,9,8],
	\[8,1,4,7,6,9,3,2,5]
    ],
    [
	\[11,49,22,43,10,41,60,27,47,5,1,25,15,50,13,37,55,39,63,65,62,3,57,38,12,59,8,30,44,28,56,36,33,45,64,32,16,24,18,52,6,46,4,29,34,42,9,58,2,14,61,40,54,53,17,31,23,48,26,7,51,21,19,35,20],
	\[16,52,11,63,17,15,49,38,39,62,35,31,7,55,34,42,29,22,14,40,21,43,37,1,56,8,5,3,27,60,46,9,18,54,28,50,47,51,65,64,23,24,33,20,25,61,41,45,58,30,26,4,19,6,53,48,10,13,57,36,12,59,2,44,32]
    ]
];

_classinfo :=  [ "
     Class :     1A     2A     3A     5A     B* 
     |c(x)|:     60      4      3      5      5 
", "
     Class :      1A      2A     3A     3B     4A     5A     B*
     |c(x)|:     360       8      9      9      4      5      5 
", "
     Class :      1A   2A    3A    3B    4A    5A    6A   7A    B**
     |c(x)|:    2520   24    36     9     4     5    12    7      7  
", "
     Class :    1A   2A   2B   3A   3B   4A   4B   5A   6A   6B   7A   B**
     |c(x)|: 20160  192   96  180   18   16    8   15   12    6    7     7
     ------------------------------------------------------------------------
               15A   B**  
                15    15   
", "
     Class :     1A   2A   2B    3A   3B   3C   4A   4B   5A   6A   6B   7A
     |c(x)|: 181440  480  192  1080   81   54   24   16   60   24    6    7
     ------------------------------------------------------------------------
                9A   9B   10A   12A   15A   B**  
                 9    9    20    12    15    15   
", "
     Class :     1A    2A   3A   5A   B*   6A   7A   10A   B*   11A   15A
     |c(x)|: 175560   120   30   30   30    6    7    10   10    11    15 
     ------------------------------------------------------------------------
                B*   19A    B*2   C*4 
                15    19     19    19  
", "
     Class :       1A    2A    2B    3A   3B   4A   5A   B*   5C   D*
     |c(x)|:   604800  1920   240  1080   36   96  300  300   50   50
     ------------------------------------------------------------------------
                6A   6B   7A   8A   10A   B*  10C   D*  12A  15A   B*  
                24   12    7    8    20   20   10   10   12   15   15  
", "
     Class :     1A    2A   3A   4A   5A   6A   8A   B**   11A   B**   
     |c(x)|:   7920    48   18    8    5    6    8    8     11    11    
", "
     Class :     1A    2A    2B    3A    3B    4A    4B    5A    6A    6B  
     |c(x)|:  95040   240   192    54    36    32    32    10    12     6  
     ------------------------------------------------------------------------
                8A    8B   10A   11A   B** 
                 8     8    10    11    11  
", "
     Class :     1A   2A   3A   4A   4B   5A   6A   7A  B**   8A  11A  B**
     |c(x)|: 443520  384   36   32   16   5    12    7    7    8   11   11 
", "
     Class :    1A   2A   3A   5A   B*   6A   11A   B**
     |c(x)|:   660   12    6    5    5    6    11    11 
", "
     Class :    1A   2A   3A   6A   7A   B*2   C*4   13A   B* 
     |c(x)|:  1092   12    6    6    7     7     7    13   13 
", "
     Class :    1A   2A   3A   4A   8A   B*   9A   B*2   C*4   17A   B*
     |c(x)|:  2448   16    9    8    8    8    9     9     9    17   17
", "
     Class :   1A   2A   3A   5A   B*   9A   B*2   C*4  10A   B*   19A   B**
     |c(x)|: 3420   20    9   10   10    9     9     9   10   10    19    19
", "
     Class :    1A   2A   3A   4A   6A   11A   B*3   C*2   D*5   E*4  12A
     |c(x)|:  6072   24   12   12   12    11    11    11    11    11   12 
     ------------------------------------------------------------------------
                B*   23A   B** 
                12    23    23  
", "
     Class :   1A   2A   3A   4A   5A   5B   6A   12A   B*   13A   B*5   C*4
     |c(x)|: 7800   24   12   12   25   25   12    12   12    13    13    13
     ------------------------------------------------------------------------
               D*6   E*3   F*2 
                13    13    13  
", "
     Class :   1A   2A   3A   B**   7A   B*3   C*2   13A   B*3   C*4  D*5
     |c(x)|: 9828   28   27    27   14    14    14    13    13    13   13
     ------------------------------------------------------------------------
               E*2   F*6   14A   B*3   C*5  
                13    13    14    14    14
", "
     Class :     1A   2A   3A   5A   B*   7A   B*2   C*3   14A   B*5   C*3
     |c(x)|:  12180   28   15   15   15   14    14    14    14    14    14
     ------------------------------------------------------------------------
               15A   B*2   C*4   D*7   29A   B*  
                15    15    15    15    29   29
", "
     Class :    1A   2A   3A   4A   5A    B*   8A    B*   15A   B*2   C*4
     |c(x)|: 14880   32   15   16   15    15   16    16    15    15    15
     ------------------------------------------------------------------------
               D*7   16A   B*3   C*7   D*5   31A   B**  
                15    16    16    16    16    31    31
", "
     Class :    1A     2A     3A     4A     7A     B**    
     |c(x)|:   168      8      3      4      7       7    
", "
     Class :    1A    2A    3A    3B    4A    6A    8A    B**   13A   B**
     |c(x)|:  5616    48    54     9     8     6     8     8     13    13
     ------------------------------------------------------------------------
               C*5    D*8   
                13     13    
", "
     Class :      1A   2A   3A   4A   4B   4C   5A   B*   7A   B** 
     |c(x)|:   20160   64   9    16   16   16   5    5     7     7   
", "
     Class :     1A   2A   3A   4A   B**   4C   5A   5B   6A   8A   B**  10A
     |c(x)|: 372000  480   24   480  480   16   500  25   24   24   24    20
     ------------------------------------------------------------------------
               12A   B**  20A   B**  24A   B**   C**7   D*7   31A   B**   C*2 
                24    24   20    20   24    24     24    24    31    31    31 
             ----------------------------------------------------------------
              D**2   E*4   F**4   F*8   H**8   I*16   J*15  
                31    31     31    31     31     31     31    
", "
     Class :     1A    2A    3A    3B    4A    B**   4C    6A    7A
     |c(x)|:   6048    96   108    9     96    96    16    12     7 
     ------------------------------------------------------------------------
               B**   8A   B**   12A   B** 
                 7    8     8    12    12  
", "
     Class :    1A    2A   3A   4A    5A   B**   C*2   D*3   5E   F*   10A
     |c(x)|: 62400   320   15   16   300   300   300   300   25   25    20
     ------------------------------------------------------------------------
               B**   C*7   D*3  13A   B**   C*5   D*8   15A   B**   C*2  D*8
                20    20    20   13    13    13    13    15    15    15   15
", "
     Class :      1A   2A   3A   4A   5A   5B   5C   5D   6A   7A   B**
     |c(x)|:  126000  240   36    8  250   25   25   25   12    7     7  
     ------------------------------------------------------------------------
                8A   B**   10A  
                 8    8     10   
", "
     Class :     1A    2A    2B    3A    B**    3C    3D    4A    4B   5A 
     |c(x)|:  25920   576    96   648    648   108    54    48     8    5 
     ------------------------------------------------------------------------
                6A    B**    6C    D**   6E    6F    9A    B**   12A   B**
                72    72     36    36    18    12     9      9    12    12 
", "
     Class :     1A     2A    2B    2C   3A    3B   4A   4B   5A   B*   5C
     |c(x)|: 979200   3840  3840   256  180   180   32   32  300  300  300
     ------------------------------------------------------------------------
                D*   5E   6A   6B   10A   B*   10C   D*   15A   B*   15C  D*
               300   25   12   12    20   20    20   20    15   15    15  15
             ----------------------------------------------------------------
               17A   B*2   C*3   D*6  
                17    17    17    17   
", "
     Class :    1A   2A   3A   5A   B*   15A   B*4   C*2   D*8   17A   B*4
     |c(x)|:  4080   16   15   15   15    15    15    15    15    17    17
     ------------------------------------------------------------------------
               C*2   D*8   E*6   F*7   F*5   H*3 
                17    17    17    17    17    17  
", "
     Class :    1A   2A   3A   11A   B*2   C*4   D*3   E*5   31A   B*2   C*4
     |c(x)|: 32736   32   33    33    33    33    33    33    31    31    31
     ------------------------------------------------------------------------
               D*8   E*15   F*5   F*10   H*11   I*9   J*13   K*6   L*12   M*7
                31     31    31     31     31    31     31    31     31    31
             ----------------------------------------------------------------
              N*14   O*3   33A   B*2   C*4   D*8   E*16   F*10   F*13   H*7 
                31    31    33    33    33    33     33     33     33    33
             ----------------------------------------------------------------
              I*14    J*5  
                33     33  
", "
     Class :   1A   2A   3A   7A   B*2   C*4   9A   B*2   C*4 
     |c(x)|:  504    8    9    7     7     7    9     9     9   
", "
     Class :     1A   2A   4A   B**  5A   7A   B*2   C*4   13A   B*3   C*9
     |c(x)|:  29120   64   16    16   5    7     7     7    13    13    13
"];

_maxinfo :=  [ "
     Group   Order    Index    Structure    Specification      Mult
     -----   -----    -----    ---------    -------------      ----
    Max[1]    12        5         A4           N(2A^2)           2  
    Max[2]    10        6         D10          N(5AB)            1  
    Max[3]     6       10         S3           N(3A)             1 
", "
     Group    Order    Index     Structure     Specification      Mult
     -----    -----    -----     ---------     ---------------    ----
    Max[1]     60        6         A5          N(2A,3A,5A)         2 
    Max[2]     60        6         A5          N(2A,3B,5A)         2 
    Max[3]     36       10         3^2:4       N(3^2)=N(3A2 B2)    3 
    Max[4]     24       15         S4          N(2A^2)             2
    Max[5]     24       15         S4          N(2A^2)             2
", "
     Group    Order    Index    Structure     Specification        Mult
     -----    -----    -----    ---------     ----------------     ----
    Max[1]      360       7      A6            N(2A,3A,3B,4A,5A)     6  
    Max[2]      168      15      PSL(2,7)      N(2A,3B,4A,7AB)       2  
    Max[3]      168      15      PSL(2,7)      N(2A,3B,4A,7AB)       2  
    Max[4]      120      21      S5            N(2A,3A,5A)           2  
    Max[5]       72      35      (A4x3):2      N(3A),N(2A^2)         6  
", "
     Group    Order    Index    Structure      Specification     Mult
     -----    -----    -----    ---------      -------------     ---- 
    Max[1]    2520       8      A7                                6   
    Max[2]    1344      15      2^3:PSL(2,7)   N(2A^3)            2x2 
    Max[3]    1344      15      2^3:PSL(2,7)   N(2A^3)            2x2 
    Max[4]     720      28      S6                                2   
    Max[5]     576      35      2^4:(S3xS3)    N(2^4)=N(2A9 B6)   2x2 
    Max[6]     360      56      (A5x3):2       N(3A),N(2B,3A,5A)  2   
", "
     Group   Order   Index   Structure     Specification          Mult
     -----   -----   -----   ---------     -------------          ----
    Max[1]   20160      9     A8                                   2 
    Max[2]    5040     36     S7                                   2 
    Max[3]    2160     84     (A6x3):2     N(3A)                   2 
    Max[4]    1512    120     SL(2,8):3    N(2B,3B,7A,9A)          1 
    Max[5]    1512    120     SL(2,8):3    N(2B,3B,7A,9B)          1  
    Max[6]    1440    126     (A5xA4):2    N(2A^2),N(2A,3A,5A)     2x2  
    Max[7]     648    280     3^3:S4       N(3^3)=N(3A3 B4 C6)     2    
    Max[8]     216    840     3^2:2A4      N(3B^2)                 3    
", "
     Group    Order    Index    Structure     Specification     Mult
     -----    -----    -----    ---------     -------------     ---- 
    Max[1]     660      266     PSL(2,11)                        2   
    Max[2]     168     1045     2^3:7:3        N(2A^3)           1   
    Max[3]     120     1463     2xA5           N(2A)             2   
    Max[4]     114     1540     19:6           N(19ABC)          1   
    Max[5]     110     1596     11:10          N(11A)            1   
    Max[6]      60     2926     D6xD10         N(3A),N(5AB)      2   
    Max[7]      42     4180     7:6            N(7A)             1   
", "
     Group   Order   Index     Structure      Specification        Mult
     -----   -----   -----     ---------      -------------        ---
    Max[1]    6048     100     PSU(3,3)                             1
    Max[2]    2160     280     3'PGL(2,9)      N(3A)                2 
    Max[3]    1920     315     2^(1+4):A5      N(2A)                2 
    Max[4]    1152     525     2^(2+4):(3xS3)  N(2A^2)              2 
    Max[5]     720     840     A4xA5           N(2B^2),N(2A,3B,5AB) 2x2
    Max[6]     600    1008     A5xD10          N(5AB),N(2B,3A,5CD)  2 
    Max[7]     336    1800     PSL(2,7):2      N(2A,3B,4A,7A)       2 
    Max[8]     300    2016     5^2:D12         N(5^2)=N(5AB3 CD3)   2 
    Max[9]      60   10080     A5              N(2B,3B,5CD)         2 
", "
     Group   Order    Index    Structure       Specification     Mult
     -----   -----    -----    ---------       -------------     ----
    Max[1]    720      11      M10=A6'2                           3  
    Max[2]    660      12      PSL(2,11)                          2  
    Max[3]    144      55      M9:2=3^2:Q8.2   N(3A^2)            1  
    Max[4]    120      66      S5              N(2A,3A,5A)        2  
    Max[5]     48     165      M8:S3=2'S4      N(2A)              1  
", "
     Group   Order   Index    Structure         Specification         Mult
     -----   -----   -----    ---------         -------------         ---- 
    Max[1]    7920     12     M11                                      1   
    Max[2]    7920     12     M11                                      1   
    Max[3]    1440     66     M10:2=A6'2^2      N(2B,3A,3A,4B,5A)      2   
    Max[4]    1440     66     M10:2=A6'2^2      N(2B,3A,3A,4A,5A)      2   
    Max[5]     660    144     PSL(2,11)         N(2A,3B,5A,6A,11AB)    2   
    Max[6]     432    220     M9:S3=3^2:2S4     N(3A^2)                1   
    Max[7]     432    220     M9:S3=3^2:2S4     N(3A^2)                1   
    Max[8]     240    396     2xS5              N(2A),N(2B,3B,5A)      2x2 
    Max[9]     192    495     M8.S4=2^(1+4).S3  N(2B)                  2x2 
    Max[10]    192    495     4^2:D12           N(2B^2)                2x2 
    Max[11]     72   1320     A4xS3             N(2A^2),N(3B)          2   
", "
     Group    Order    Index    Structure    Specification    Mult
     -----    -----    -----    ---------    -------------    ----   
    Max[1]    20160      22     M21=PSL(3,4)                  4x12   
    Max[2]     5760      77     2^4:A6        N(2A^4)         2x12   
    Max[3]     2520     176     A7                            6      
    Max[4]     2520     176     A7                            6      
    Max[5]     1920     231     2^4:S5        N(2A^4)         2x4    
    Max[6]     1344     330     2^3:PSL(2,7)  N(2A^3)         2x2    
    Max[7]      720     616     M10=A6'2                      3      
    Max[8]      660     672     PSL(2,11)                     2      
", "
     Group    Order    Index    Structure    Specification    Mult
     -----    -----    -----    ---------    -------------    ----   
    Max[1]     60       11       A5          N(2A,3A,5AB)      2     
    Max[2]     60       11       A5          N(2A,3A,5AB)      2     
    Max[3]     55       12       11:5        N(11AB)           1     
    Max[4]     12       55       D12         N(2A),N(3A)       2     
", "
     Group    Order    Index    Structure    Specification   Mult
     -----    -----    -----    ---------    -------------   ----
    Max[1]     78       14       13:6        N(13AB)          1 
    Max[2]     14       78       D14         N(7ABC)          1
    Max[3]     12       91       D12         N(2A),N(3A)      2  
    Max[4]     12       91       A4          N(2A^2)          2  
", "
     Group    Order    Index    Structure    Specification    Mult
     -----    -----    -----    ---------    -------------    ----
    Max[1]     136       18      17:8        N(17AB)           1  
    Max[2]      24      102      S4          N(2A^2)           2  
    Max[3]      24      102      S4          N(2A^2)           2  
    Max[4]      18      136      D18         N(3A)             1  
    Max[5]      16      153      D16         N(2A)             2  
", "
     Group    Order    Index    Structure    Specification    Mult
     -----    -----    -----    ---------    -------------    ----
    Max[1]     171       20      19:9        N(19AB)           1  
    Max[2]      60       57      A5          N(2A,3A,5AB)      2  
    Max[3]      60       57      A5          N(2A,3A,5AB)      2  
    Max[4]      20      171      D20         N(2A),N(5AB)      2  
    Max[5]      18      190      D18         N(3A)             1  
", "
     Group    Order   Index    Structure    Specification    Mult
     -----    -----   -----    ---------    -------------    ---- 
    Max[1]     253      24      23:11       N(23AB)            1  
    Max[2]      24     253      S4          N(2A^2)            2  
    Max[3]      24     253      S4          N(2A^2)            2  
    Max[4]      24     253      D24         N(2A),N(3A)        2  
    Max[5]      22     276      D22         N(11ABCDE)         1  
", "
     Group    Order    Index    Structure    Specification   Mult
     -----    -----    -----    ---------    -------------   ----
    Max[1]     300       26     5^2:12       N(5A^2)          1  
    Max[2]     120       65     S5                            2  
    Max[3]     120       65     S5                            2  
    Max[4]      26      300     D26          N(13A-F)         1  
    Max[5]      24      325     D24          N(2A),N(3A)      2  
", "
     Group    Order    Index    Structure   Specification    Mult
     -----    -----    -----    ---------   -------------    ---- 
    Max[1]     351       28      3^3:13      N(3AB^3)         1   
    Max[2]      28      351      D28         N(2A),N(7ABC)    2   
    Max[3]      26      378      D26         N(13A-F)         1   
    Max[4]      12      819      A4          N(2A^2)          2   
", "
     Group    Order    Index    Structure    Specification    Mult
     -----    -----    -----    ---------    -------------    ----
    Max[1]     406       30      29:14       N(29AB)            1  
    Max[2]      60      203      A5          N(2A,3A,5AB)       2 
    Max[3]      60      203      A5          N(2A,3A,5AB)       2  
    Max[4]      30      406      D30         N(3A),N(5AB)       1  
    Max[5]      28      435      D28         N(2A),N(7ABC)      2  
", "
     Group    Order    Index    Structure    Specification      Mult
     -----    -----    -----    ---------    -------------      ----
    Max[1]     465         32     31:15         N(31AB)           1   
    Max[2]      60        248     A5            N(2A,3A,5AB)      2   
    Max[3]      60        248     A5            N(2A,3A,5AB)      2   
    Max[4]      32        465     D32           N(2A)             2    
    Max[5]      30        496     D30           N(3A),N(5AB)      1   
", "
     Group    Order    Index    Structure    Specification       Mult
     -----    -----    -----    ---------    -------------       ----
    Max[1]       24        7        S4          N(2A^2)              2
    Max[2]       24        7        S4          N(2A^2)              2
    Max[3]       21        8        7:3         N(7AB)               1
", "
     Group    Order    Index    Structure     Specification      Mult
     -----    -----    -----    ---------     -------------      ----
    Max[1]      432      13      3^2:2S4        N(3A^2)            1  
    Max[2]      432      13      3^2:2S4        N(3A^2)            1  
    Max[3]       39     144      13:3           N(13ABCD)          1  
    Max[4]       24     234      S4             N(2A^2)            2  
", "
     Group   Order   Index    Structure    Specification         Mult
     -----   -----   -----    ---------    -------------         -----
    Max[1]    960     21      2^4:A5       N(2A^4)               2x4x4
    Max[2]    960     21      2^4:A5       N(2A^4)               2x4x4
    Max[3]    360     56      A6           N(2A,3A,3A,4A,5AB)    6    
    Max[4]    360     56      A6           N(2A,3A,3A,4B,5AB)    6    
    Max[5]    360     56      A6           N(2A,3A,3A,4C,5AB)    6    
    Max[6]    168    120      PSL(2,7)     N(2A,3A,4A,7AB)       2    
    Max[7]    168    120      PSL(2,7)     N(2A,3A,4B,7AB)       2    
    Max[8]    168    120      PSL(2,7)     N(2A,3A,4C,7AB)       2    
    Max[9]     72    280      3^2:Q8       N(3A^2)               3    
", "
     Group    Order    Index    Structure     Specification     Mult
     -----    -----    -----    ----------    -------------     ---- 
    Max[1]    12000      31     5^2:GL(2,5)   N(5A^2)            2   
    Max[2]    12000      31     5^2:GL(2,5)   N(5A^2)            2   
    Max[3]      120    3100     S5            N(2A,3A,5B)        2   
    Max[4]       96    3875     4^2:S3        N(2A^2)            2   
    Max[5]       93    4000     31:3          N(31ABCDEFGHIJ)    1   
", "
     Group    Order    Index    Structure      Specification       Mult
     -----    -----    -----    ----------     --------------      ----
    Max[1]     216      28      3^(1+2):8       N(3A)               1  
    Max[2]     168      36      PSL(2,7)        N(2A,3B,4C,7AB)     2  
    Max[3]      96      63      4'S4            N(2A)               1  
    Max[4]      96      63      4^2:S3          N(2A^2)             2  
", "
     Group    Order    Index     Structure     Specification     Mult
     -----    -----    -----     ----------    -------------     ----
    Max[1]     960       65      2^(2+4):15     N(2A^2)           1  
    Max[2]     300      208      5xA5           N(5ABCD)          2  
    Max[3]     150      416      5^2:S3         N(5^2)            1  
    Max[4]      39     1600      13:3           N(13ABCD)         1  
", "
     Group   Order    Index    Structure    Specification     Mult
     -----   -----    -----    ---------    -------------     ----
    Max[1]   2520       50     A7           N(...5B,...)       6  
    Max[2]   2520       50     A7           N(...5C,...)       6  
    Max[3]   2520       50     A7           N(...5D,...)       6  
    Max[4]   1000      126     5^(1+2):8    N(5A)              1  
    Max[5]    720      175     M10=A6'2     N(...5B,...)       3  
    Max[6]    720      175     M10=A6'2     N(...5C,...)       3  
    Max[7]    720      175     M10=A6'2     N(...5D,...)       3  
    Max[8]    240      525     2S5          N(2A)              1  
", "
     Group  Order   Index    Structure       Specification           Mult
     -----  -----   -----    -----------     ---------------         ---- 
    Max[1]    960      27      2^4:A5         N(2^4)=N(2A5 B10)       2x2 
    Max[2]    720      36      S6             N(2B,3C,3D,4B,5A)       2   
    Max[3]    648      40      3^(1+2):2A4    N(3AB)                  2   
    Max[4]    648      40      3^3:S4         N(3^3)=N(3AB4 C3 D6)    1   
    Max[5]    576      45      2'(A4xA4).2    N(2A)                   2   
", "
     Group    Order    Index    Structure    Specification      Mult
     -----    -----    -----    ---------    -------------      ----
    Max[1]    11520     85      2^6:(3xA5)    N(2A^2),N(2C^4)    2  
    Max[2]    11520     85      2^6:(3xA5)    N(2B^2),N(2C^4)    2  
    Max[3]     8160    120      SL(2,16):2    N(2C,3A,5AB,...)   1  
    Max[4]     8160    120      SL(2,16):2    N(2C,3B,5CD,...)   1  
    Max[5]     7200    136      (A5xA5):2     N(2B,3B,5CD)^2     2  
    Max[6]     7200    136      (A5xA5):2     N(2A,3A,5AB)^2     2  
    Max[7]      720   1360      S6            N(2C,3A,3B,4B,5E)  2  
", "
     Group    Order    Index     Structure    Specification    Mult
     -----    -----    -----     ---------    -------------    ----
    Max[1]     240       17       2^4:15      N(2A^4)            1 
    Max[2]      60       68       A5          N(2A,3A,5AB)       2 
    Max[3]      34      120       D34         N(17A-H)           1 
    Max[4]      30      136       D30         N(3A),N(5AB)       1 
", "
     Group    Order    Index    Structure    Specification       Mult
     -----    -----    -----    ---------    -------------       ----
    Max[1]     992       33      2^5:31       N(2A^5)              1
    Max[2]      66      496      D66          N(3A),N(11ABCDEF)    1
    Max[3]      62      528      D62          N(31A-O)             1
", "
     Group   Order   Index   Structure   Specification   Mult
     -----   -----   -----   ---------   -------------   ----  
    Max[1]    56       9     2^3:7       N(2A^3)          1 
    Max[2]    18      28     D18         N(3A)            1 
    Max[3]    14      36     D14         N(7ABC)          1 
", "
     Group    Order    Index    Structure    Specification    Mult
     -----    -----    -----    ---------    -------------    ----  
    Max[1]    448        65     2^(3+3):7    N(2A^3)          2x2  
    Max[2]     52       560     13:4         N(13ABC)         1    
    Max[3]     20      1456     5:4          N(5A)            1    
    Max[4]     14      2080     D14          N(7ABC)          1    
"];

_F2 := FreeGroup(2);

_recf := recformat<
    Name,
    F,
    RepsF,
    MaxF,
    SylF,
    G,
    Reps,
    Max,
    Syl,
    phi,
    rho,
    ClassInfo,
    MaxInfo
>;

_name_to_i := function(name)
    i := Position(_names, name);
    error if i eq 0,
	"Name must be one of " cat _names[1] cat
	    &cat[", " cat _names[i]: i in [2 .. #_names]];
    return i;
end function;

_i_to_group := func<i |
    PermutationGroup<n | x> where n is #x[1] where x is _cycles[i]
>;

_info_init := func<i |
    rec<_recf |
	Name := _names[i],
	ClassInfo := _classinfo[i],
	MaxInfo := _maxinfo[i]
    >
>;

_add_fp := procedure(~X, i)
    F<x, y> := quo<_F2 | _words[_relators[i]]>;
    X`F := F;
end procedure;

_add_fp_reps := procedure(~X, i)
    X`RepsF := [X`F | _words[x] : x in _repsf[i]];
end procedure;

_add_fp_maxs := procedure(~X, i)
    X`MaxF := [sub<X`F | _words[x]>: x in _maxf[i]];
end procedure;

_add_fp_syls := procedure(~X, i)
    F := X`F;
    SylF := [ PowerGroup(F) | ];
    for j in [1 .. #_sylf[i]] do
	if IsDefined(_sylf[i], j) then
	    SylF[j] := sub<F | _words[_sylf[i][j]]>;
	end if;
    end for;
    X`SylF := SylF;
end procedure;

_add_perm := procedure(~X, i)
    G<a, b> := _i_to_group(i);
    X`G := G;
end procedure;

_add_forward_hom := procedure(~X)
    X`phi := hom<F -> G | [G.i: i in [1 .. Ngens(F)]]>
	where F is X`F where G is X`G;
end procedure;

_add_reverse_hom := procedure(~X)
    X`rho := tau * hom<Codomain(tau) -> F | [F.i: i in [1 .. Ngens(G)]]>
	where tau is InverseWordMap(G) where F is X`F where G is X`G;
end procedure;

_add_perm_reps := procedure(~X)
    X`Reps := [ phi(c): c in RepsF ] where phi is X`phi where RepsF is X`RepsF;
end procedure;

_add_perm_maxs := procedure(~X)
    X`Max := [ phi(H): H in MaxF ] where phi is X`phi where MaxF is X`MaxF;
end procedure;

_add_perm_syls := procedure(~X)
    G := X`G;
    SylF := X`SylF;
    phi := X`phi;
    Syl := [ PowerGroup(G) | ];
    for j in [1 .. #SylF] do
	if IsDefined(SylF, j) then
	    Syl[j] := phi(SylF[j]);
	end if;
    end for;
    X`Syl := Syl;
end procedure;

_i_to_all := function(i)
    X := _info_init(i);
    _add_fp(~X, i);
    _add_fp_reps(~X, i);
    _add_fp_maxs(~X, i);
    _add_fp_syls(~X, i);
    _add_perm(~X, i);
    _add_forward_hom(~X);
    _add_reverse_hom(~X);
    _add_perm_reps(~X);
    _add_perm_maxs(~X);
    _add_perm_syls(~X);
    return X;
end function;

SimNames := func< | _names>;
SimGroup := func<name | _i_to_group(_name_to_i(name))>;
SimClassInfo := func<name | _classinfo[_name_to_i(name)]>;
SimMaxInfo := func<name | _maxinfo[_name_to_i(name)]>;
SimRecord := func<name | _i_to_all(_name_to_i(name))>;

SimRecordInit := func<name | _info_init(_name_to_i(name))>;

_LHdep := {@ "Syl", "Max", "Reps", "phi", "rho", "SylF", "MaxF", "RepsF" @};
_RHdep := [["F", "G", "phi", "SylF"], ["F", "G", "phi", "MaxF"], ["F", "G", "phi", "RepsF"], ["F", "G"], ["F", "G"], ["F"], ["F"], ["F"]];

SimRecordRequire := procedure(~X, Q)
    case Type(Q):
    when MonStgElt:
	pos := Position(_LHdep, Q);
	if pos eq 0 then
	    S := {@ Q @};
	else
	    S := {@ x : x in _RHdep[pos] @};
	    Include(~S, Q);
	end if;
    when SeqEnum, SetEnum, SetIndx:
	S := {@ @};
	for x in Q do
	    pos := Position(_LHdep, x);
	    if pos ne 0 then
		for y in _RHdep[pos] do
		    Include(~S, y);
		end for;
	    end if;
	    Include(~S, x);
	end for;
    else
	error "Requirement must be a string or a set of strings";
    end case;
    i := _name_to_i(X`Name);
    for j := 1 to #S do
	x := S[j];
	case x:
	when "F": if not assigned X`F then _add_fp(~X, i); end if;
	when "RepsF": if not assigned X`RepsF then _add_fp_reps(~X, i); end if;
	when "MaxF": if not assigned X`MaxF then _add_fp_maxs(~X, i); end if;
	when "SylF": if not assigned X`SylF then _add_fp_syls(~X, i); end if;
	when "G": if not assigned X`G then _add_perm(~X, i); end if;
	when "Reps": if not assigned X`Reps then _add_perm_reps(~X); end if;
	when "Max": if not assigned X`Max then _add_perm_maxs(~X); end if;
	when "Syl": if not assigned X`Syl then _add_perm_syls(~X); end if;
	when "phi": if not assigned X`phi then _add_forward_hom(~X); end if;
	when "rho": if not assigned X`phi then _add_reverse_hom(~X); end if;
	when "Name": /* do nothing */ ;
	when "ClassInfo": /* do nothing */ ;
	when "MaxInfo": /* do nothing */ ;
	else error "Requirement string should be a record field name";
	end case;
    end for;
end procedure;

SimGroupSatisfying := function(f)
    if exists(G){
	g: i in [1 .. _maxi] | f(g)
	where g is _i_to_group(i)
    } then
	return G;
    end if;
end function;

SimGroupsSatisfying := func<f |
    [g: i in [1 .. _maxi] | f(g) where g is _i_to_group(i)]
>;

SimProcess := func< | <1, _maxi>>;
SimProcessIsEmpty := func<p | p[1] eq 0>;

SimProcessGroup := function(p)
    error if SimProcessIsEmpty(p),
	"Attempt to extract group from empty process";
    return _i_to_group(p[1]);
end function;

SimProcessName := function(p)
    error if SimProcessIsEmpty(p),
	"Attempt to extract name from empty process";
    return _names(p[1]);
end function;

SimProcessClassInfo := function(p)
    error if SimProcessIsEmpty(p),
	"Attempt to extract information from empty process";
    return _classinfo(p[1]);
end function;

SimProcessMaxInfo := function(p)
    error if SimProcessIsEmpty(p),
	"Attempt to extract information from empty process";
    return _maxinfo(p[1]);
end function;

SimProcessRecord := function(p)
    error if SimProcessIsEmpty(p),
	"Attempt to extract information from empty process";
    return _i_to_all(p[1]);
end function;

SimProcessRecordInit := function(p)
    error if SimProcessIsEmpty(p),
	"Attempt to extract information from empty process";
    return _info_init(p[1]);
end function;

SimProcessNext := procedure(~p)
    error if SimProcessIsEmpty(p),
	"Attempt to traverse empty process";
    if p[1] lt p[2] then
	p[1] +:= 1;
	return;
    end if;
    p[1] := 0;
end procedure;

delete _F2, _i_to_all, _maxf, _recf, _sylf, _classinfo, _name_to_i;
delete _maxinfo, _relators, _words, _cycles, _names, _repsf;
delete _add_forward_hom, _add_fp, _add_fp_maxs, _add_fp_reps, _add_fp_syls;
delete _add_perm, _add_perm_maxs, _add_perm_reps, _add_perm_syls;
delete _add_reverse_hom, _info_init;
delete _i_to_group, _maxi, _LHdep, _RHdep;
