\begin{tikzpicture}[->,auto,node distance=2.5cm]
  \node[initial,state,accepting] (a) {$A$};
  \node[state,accepting] (b) [right of=a] {$B$};
  \path (a) edge [bend left=20] node [above] {$(\text{s}, \epsilon)$} (b)
        (b) edge [bend left=20] node [below] {$(\text{s}, \epsilon)$} (a)
        (a) edge [loop above] node {$(\text{p}, a)$} (a)
        (b) edge [loop above] node {$(\text{p}, b)$} (b);
\end{tikzpicture}
