$\{v_1,v_2\}$, and similarly, $u$ has at least one neighbour in $\{v_{p-1},v_p\}$. So $A\subseteq A_X$. Now suppose $u\in A_X$. Note that $u\neq v_3$ due to our choice of $X$. Then the subgraph of $G$ induced by $V(P)\cup \{u\}$ contains a cycle. Hence $u$ must belong to $A$. So $A_X\subseteq A$. We conclude that $A=A_X$.

We now consider the case where every connected component of $F$ has diameter at most $2$. Such components are either isolated vertices or stars (we say that the latter components are [*star-components*]{} and that their non-leaf vertex is the [*star-centre*]{}; if such a component consists of a single edge, we arbitrarily choose one of them to be the star-centre). If $F$ contains no star-components, then $G$ is bipartite and therefore $G-u$ is bipartite for every vertex $u$, a contradiction. If $F$ contains exactly one star-component, then by choosing $u$ to be the star-centre we again find that $G-u$ is bipartite. Hence $F$ contains at least two star-components $D_1$ and $D_2$. For $i=1,2$, let $v_i$ be the star-centre and let $w_i$ be a leaf in $D_i$.

We choose $X=\{v_1,v_2,w_1,w_2\}$ and show that $A=A_X$. Let $u\in A$. As $G$ has diameter $2$ and $A$ is an independent set, $u$ 