Do there exist non-isomorphic finitely generated groups, $G$ and $H$, along with epimorphisms $\phi:G\rightarrow H$ and $\psi:H\rightarrow G$, such that every generating set of these groups is an image of a generating set, that's mean, for every generating sets $\{g\_1,\dotsc,g\_m\}$ and $\{h\_1,\dotsc,h\_n\}$ of $G$ and $H$ respectively, there are generating sets $\{y\_1,\dotsc,y\_m\}$ and $\{x\_1,\dotsc,x\_n\}$ such that 
$$g\_i=\psi(y\_i),\quad\text{and}\quad h\_j=\phi(x\_j)$$ 



A question about generating set of groups and epimorphism
I only want to explain Yves's example in details. 


Put $\mathbf Z:=\mathbb Z[t,t^{-1}]$, the ring of Laurent polynomials. Let $B$ be a group of matrices
[\begin{pmatrix}
1&P&R\\
0&D&Q\\
0&0&1
\end{pmatrix}
]
where $P$, $Q$ and $R$ belongs to $\mathbf{Z}$, and $D\in\langle t\rangle$. The group $B$ is easily checked to be finitely generated, and its center consists of unipotent matrices with a single possibly
non-trivial element in the upper right corner. It is clearly isomorphic to $\mathbf{Z}$. Also, the map 
$$ \Phi:B\rightarrow B,\quad
\begin{pmatrix}
 1&P&R\\‎
 0&D&Q\\‎
 0&0&1
 \end{pmatrix}‎\mapsto ‎‎
 \begin{pmatrix}
 1&P&tR\\‎
 0&D&tQ\\‎
 0&0&1
 \end{pmatrix}‎$$
 introduces an automorphism of $B$. 


Set $N\_k:=\bigoplus\{\mathbb Zt^m:m=k,k+1,\dots\}$, $k\in\mathbb Z$. The automorphism $\Phi$, implies that $B/N\_k\cong B/\Phi(N\_k)=B/N\_{k+1}$, $k\in\mathbb Z$. Now, let $G:=B/N\_0$ and $H:=B/(2\mathbb Z\oplus N\_1)$. Then non-isomorphic groups $G$ and $H$ satisfy the conditions. 


