Hydration of lanthanides and actinides in solution