  Baryons containing two heavy quarks are treated in the Born-Oppenheimer
approximation. Schr\"odinger equation for two center Coulomb plus harmonic
oscillator potential is solved by the method of ethalon equation at large
intercenter separations. Asymptotical expansions for energy term and wave
function are obtained in the analytical form. Using those formulas, the energy
spectra of doubly heavy baryons with various quark compositions are calculated
analytically.
