Bug in class graph

When I came back to old way of changing of size of matrix.
Moreover adding loading input from file.