The connectivity of water in hydrophilic confinements of different dimensionality