Possible origin of lunar ice