Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
HenrikRüping's answer gives conjugate solutions. I originally omitted to mention that I would quite like the solutions to be non-conjugate. I subsequently edited the question to include this.; added 29 characters in body
@Denis Serre: With respect to your edit, I did mean words and not letters. A and B are words, not necessarily letters, so giving the definition of W(x, y) in terms of letters doesn't make sense...
Such a group is necessarily Large (Large in the sense of Gromov/Pride) also (this implies SQ-universal, along with a number of other properties). See this paper of Button for more details, springerlink.com/content/u014p6u2w4560786
@Henry Wilton: One can also use the theory of one-relator groups to prove that this group is torsion free; for $r$ not a proper power in $F(X)$, $\langle X; r^n\rangle$ contains torsion if and only if $n > 1$ (see Magnus, Karrass and Solitar, or Lyndon and Schupp).
It is the first $n$ where it happens. There are actually two `Skewes' Number's, each assuming whether the Riemann Hypothesis is true or false respectively. See the link to mathworld in the post.
I should probably point out that this can be generalised to every $p>2$. That is, there always exists a group of order $p^{2n+1}$ with exponent $p$ such that $|Z(G)| = p$. Look up the classification of Extra-special $p$-groups for more details.