Cold atomic media with ultrahigh optical depths