# You can write this code in the GAP console application.

LoadPackage("digraphs");
LoadPackage("jupyterviz");
filename := "C:/Users/simon/Documents/Matfyz/Bakalarka/bakalarka/minasgraphs.txt";
graphs := ReadDigraphs(DigraphFile(filename, "r"));
newGraphs := [];
isIso := false;

for i in graphs do
	if Size(newGraphs) > 0 then
		for j in newGraphs do
			if IsIsomorphicDigraph(ReducedDigraph(i), j) then
				isIso := true;
			fi;
		od;
	fi;
	if isIso = false then
		Add(newGraphs, ReducedDigraph(i));
	fi;
	isIso := false;
od;

Print(Size(newGraphs), " ");
for k in newGraphs do
	if Size(AutomorphismGroup(k)) > 0 then
		Print(Size(AutomorphismGroup(k)), " ");
		PlotGraph([1..Size(DigraphVertices(k))], DigraphEdges(k),
		rec(layout := "grid", vertexwidth := 30, vertexheight := 30,
		vertexcolor := "#666", arrowscale := 2, height := 300, width := 300));
	fi;
od;