Analysis of the network topology in liquid water and hydrogen sulphide by computer simulation