Initialize graph