Gmatrix function

Construction of Relationship Matrix G