and thus $|C_1|=|C_2|$. Suppose first that $|C_1|=4$. In this case, $G$ is bipartite. Let $C_1=v_1v_2v_3v_4$, with the labels chosen so that $\psi(v_1)=\psi(v_3)$. For $1\le i\le 3$, let $S_i$ denote the set of vertices of $G$ at distance exactly $i$ from $\{v_2,v_4\}$. Let $G'$ be the graph obtained from $G-(S_1\cup S_2)$ by identifying all vertices in $S_3$ to a single vertex $x$. Note that $G'$ is also bipartite, and in particular it has no loops and it is triangle-free. Furthermore, since the distance between $C_1$ and $C_2$ is at least four, $C_2$ is a cycle in $G'$. By Theorem \[thm-6cyc\], $G'$ has a $3$-coloring $\varphi'$ that matches $\psi$ on $C_2$. Then, we can obtain a $3$-coloring of $G$ that extends $\psi$ by coloring every vertex $v\in V(G')\setminus\{x\}$ by the color $\varphi'(v)$, all vertices in $S_3$ by the color $\varphi'(x)$, all vertices in $S_2$ by a color distinct from $\varphi'(x)$ and $\psi(v_1)$, all vertices in $S_1$ by the color $\psi(v_1)$, and $v_2$ by $\psi(v_2)$ and $v_4$ by $\psi(v_4)$.

Suppose now that $|C_1|=3$. Note that the winding number of $\psi$ on each of $C_1$ and $C_2$ is either $1$ or $-1$. By Lemma \[lemma-cylflow\], if the winding numbers of $\psi$ on $C_1$ and 