Mass spectra of doubly heavy baryons in the relativistic quark model