using SparseDiffTools
vertices = [10,10,20,20,50]

sources = [[8,5,4,7,8,2,10,4,4,2,2],

        [3,8,3,4,3,2,5,6,1,3,1,4,4,5,6,8,10,2,1,10,1],

        [16,12,8,2,14,20,20,13,11,11,1],

        [9,4,1,8,11,5,13,20,8,3,6,10,17,18,14,6,2,2,14,8,10,8,1,6,16,14,11,3,7,3,1,12,18,1,9,9,19,13,4,19,4],

        [10,41,49,35,13,5,17,6,21,46,49,43,3,16,28,11,45,30,36,3,35,49,40,8,38,49,24,7,24,38,27,41,27,43,47,
        36,48,10,14,31,37,38,5,8,42,18,17,17,49,30,1,34,34,30,19,19,12,1,9,48,33,12,11,37,14,46,30,21,8,44,
        19,19,16,1,32,33,13,30,22,36,16,43,32,25,7,46,48,45,18,1,15,35,5,35,1,44,11,23,31,6,43]]


destinations = [[10,6,2,9,6,10,3,7,10,9,5],

                [4,3,9,7,5,10,4,5,9,2,3,6,2,10,7,5,7,8,2,3,6],

                [18,16,10,1,13,11,12,19,18,6,7],

                [14,16,15,3,17,2,4,15,13,12,18,8,4,19,17,20,20,14,11,2,9,16,2,12,13,8,19,2,14,13,14,9,5,12,17,3,17,1,2,4,20],

                [21,10,7,14,44,38,5,32,16,10,8,9,41,36,45,21,17,18,37,31,11,40,45,17,34,16,25,17,12,50,12,32,5,15,25,1,18,32,
                45,46,22,29,50,10,18,21,21,16,45,49,29,46,22,2,12,13,50,34,4,1,21,32,17,24,12,50,15,7,47,7,7,40,29,15,13,2,22,
                28,28,31,2,1,17,22,35,28,46,31,6,46,29,16,12,17,32,41,40,30,29,47,41]]


coloring = [[1,1,1,3,2,1,1,3,2,2],

        [3,2,1,3,2,1,2,3,2,3],

        [1,2,1,1,1,2,2,1,1,2,1,1,1,2,1,2,1,3,2,2],

        [3,1,2,3,2,3,1,3,3,1,3,1,1,2,1,2,1,1,2,2],

        [3,1,1,1,2,3,3,2,2,1,3,3,3,1,2,3,1,1,1,1,2,2,1,1,3,1,1,1,1,3,2,2,3,1,2,1,3,3,1,2,3,2,1,1,3,4,1,2,1,1]]



v1 = zeros(Int64,0)
v2 = zeros(Int64,0)
v3 = zeros(Int64,0)
v4 = zeros(Int64,0)
v5 = zeros(Int64,0)

a1 = [Vector{Int64}() for _ in 1:vertices[1]]
a2 = [Vector{Int64}() for _ in 1:vertices[2]]
a3 = [Vector{Int64}() for _ in 1:vertices[3]]
a4 = [Vector{Int64}() for _ in 1:vertices[4]]
a5 = [Vector{Int64}() for _ in 1:vertices[5]]

g1 = CGraph(v1,a1)
g2 = CGraph(v2,a2)
g3 = CGraph(v3,a3)
g4 = CGraph(v4,a4)
g5 = CGraph(v5,a5)

graphs = [g1,g2,g3,g4,g5]

for j = 1:5
        for i = 1:vertices[j]
                add_vertex!(graphs[j],i)
        end
end


for j = 1:5
        for i = 1:length(sources[j])
                s = sources[j][i]
                d = destinations[j][i]
                add_edge!(graphs[j],sources[j][i],destinations[j][i])
        end
end
