For each $i$, let $u_i=z_{i+1}-z_i$. Then $A$ is generated by $x$, $y$, and the classes $u_i$ for $i=0,\ldots,n-1$, and has the relation $\sum u_i = 0$. In this notation, $B=\{x\sum a_i + y\sum b_j + \sum (a_i+b_i) u_i \mid a_i,b_i\in \mathbb{Z}\,\forall i\in\mathbb{Z}/n\mathbb{Z}\}$.
Pick an integer $k$ and let $a_k=1$, $a_{k+1}=-1$, $a_j=0$ for $j\neq k$ and $b_j=0$. Then $u_{k+1}-u_k\in B$. Hence $\overline{u_k}=\overline{u_{k+1}}$ as elements of $A/B$. Therefore the value is $\overline{u_k}$ is independent of $k$; we will denote this value by $\bar{u}$.
You can easily check that $\bar{x}=\bar{y}=-\bar{u}$. Then $\bar{u}$ generates $A/B$. We have only the relation $n\bar{u}=\sum \overline{u_j}=0$; the relations $\bar{x}\sum a_i + \bar{y}\sum b_j + \sum (a_i+b_i) \overline{u_i}=0$ become $-\bar{u} \sum a_i -\bar{u} \sum b_j + \sum (a_i+b_i) \bar{u}=0$, which is trivial. The group generated by $\bar{u}$ with the relation $n\bar{u}=0$ is of course $\mathbb{Z}/n\mathbb{Z}$.