  Experimental and theoretical study of superconductor (S) -- ferromagnet (F)
-- superconductor junctions showed that in certain range of parameters (e.g.,
the length of the ferromagnet $d_F$, the exchange field, $E_{\rm ex}$) the
ground state of a SFS junction corresponds to superconducting phase difference
$\pi$ or 0. The phase diagram of a SFS junction with the respect to $\pi$ and 0
states is investigated in this letter in $E_{\rm ex}, d_{F}, T$ space. It is
shown that the phase diagram is very sensitive to the geometry of the system,
in particular, to the amount of disorder.
