Water-repellant material sheds like a snake when damaged