Labeling the graphs