Determining the Class hierarchy