Created classes for printing a graph