in $G$ in fact has length larger than $g(k)$. Since a vertex of degree at most $1$ is not visited by any long cycle, we may also assume that the minimum degree of $G$ is at least $2$.\
Next, we partition $V(G)$ into a collection of sets that each induce a connected subgraph, as follows. Let $X$ be a maximal collection of vertices that are pairwise at distance at least $g(k)/4$. For each $x\in X$ and $s\in \mathbb{N}$, let $B_s(x)$ denote the set of vertices that are at distance at most $s$ from $x$. We will refer to $B_s(x)$ as the *ball* of radius $s$ centered at $x$. Of particular interest are the balls of radius $r:= g(k)/8$. The balls $(B_r(x))_{x\in X}$ do not necessarily partition $V(G)$, but we will fix this by extending them. First add each vertex at distance $r+1$ of $X$ to one of the balls to which it is adjacent. After that, add every vertex at distance $r+2$ from $X$ to one of the sets constructed in the previous step. This process is continued until every vertex is covered. For each $x \in X$, we denote by $H(x)$ the graph induced by the final set that 