Constructing a graph from its degree distribution using HH theorem