We consider a generalization of the three spectral inverse problem, that is, for given spectrum of the Dirichlet-Dirichlet problem (the Sturm-Liouville problem with Dirichlet conditions at both ends) on the whole interval [0, a], parts of spectra of the Dirichlet-Neumann and Dirichlet-Dirichlet problems on [0, a/2] and parts of spectra of the Dirichlet-Newman and Dirichlet-Dirichlet problems on [a/2, a], we find the potential of the Sturm-Liouville equation.