First step:
Don't distinguish between $X$ and $Y$. So how many different ways are there to to arrange $A,B,C,D,E,F,Z,Z,Z,Z,Z$?
The answer is
$$\frac{11!}{1!\cdot 1!\cdot 1!\cdot 1!\cdot 1!\cdot 1!\cdot 5!}=6\cdot 7 \cdots 11$$
Second step:
For each of such arrangements there is always the same number of ways to replace the $Z$ by $X$ and $Y$ so that the constraints are satisfied. This does not depend how the $A,B,C,D,E,F,Z$ are placed in the string.
The most left $Z$ and the most right $Z$ cant be replaced by an $Y$ so must replaced by $X$. The remaining three inner $Z$ must be replaced by $X,Y,Y$. These are
$$\frac{3!}{1!\cdot 2!}=3$$
possibilities.
So the result is
$$(6\cdot 7 \cdots 11)\cdot 3$$