local G, i, L;
G := CyclicGroup(32);
for i in [1..n] do
G := AutomorphismGroup(G);
if i = n then return break; fi;
L := DirectFactorsOfGroup(G);
if List(L, x->IdGroupsAvailable(Size(x))) = List(L, x->true) then
L := List(L, x->IdGroup(x));
G := DirectProduct(List(L, x->SmallGroup(x))); # It's more efficient to operate on abstract groups when the abstract structure is available
fi; od;
return Size(G);
end;