Gravitational wave spectral shapes as a probe of long lived right-handed neutrinos, leptogenesis and dark matter. Global versus local B − L cosmic strings | Synapse