Robots inspired by sea cucumbers turn from liquid into solid